Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Power debug tool (powerdebug) |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 3 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 4 | * Copyright (C) 2016, Linaro Limited. |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 5 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 10 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | * |
| 20 | */ |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 21 | |
Sanjay Singh Rawat | 781dc31 | 2014-06-19 17:56:55 +0530 | [diff] [blame] | 22 | #define VERSION "0.7.3" |
Daniel Lezcano | 30f0147 | 2016-02-18 16:08:10 +0000 | [diff] [blame] | 23 | |
Daniel Lezcano | b4eec7e | 2016-02-18 16:44:55 +0000 | [diff] [blame^] | 24 | #define REGULATOR_OPTION 0x01 |
| 25 | #define SENSOR_OPTION 0x02 |
| 26 | #define CLOCK_OPTION 0x04 |
| 27 | #define GPIO_OPTION 0x08 |
| 28 | |
| 29 | #define VERBOSE_OPTION 0x10 |
| 30 | #define DUMP_OPTION 0x20 |
| 31 | |
| 32 | #define DEFAULT_OPTION (REGULATOR_OPTION | SENSOR_OPTION | \ |
| 33 | CLOCK_OPTION | GPIO_OPTION) |
| 34 | |
Daniel Lezcano | 30f0147 | 2016-02-18 16:08:10 +0000 | [diff] [blame] | 35 | struct powerdebug_options { |
| 36 | int flags; |
| 37 | unsigned int ticktime; |
| 38 | int selectedwindow; |
| 39 | char *clkname; |
| 40 | }; |
| 41 | |
Daniel Lezcano | b4eec7e | 2016-02-18 16:44:55 +0000 | [diff] [blame^] | 42 | extern int clock_init(struct powerdebug_options *options); |
Daniel Lezcano | 30f0147 | 2016-02-18 16:08:10 +0000 | [diff] [blame] | 43 | extern int clock_dump(char *clk); |
| 44 | |
Daniel Lezcano | b4eec7e | 2016-02-18 16:44:55 +0000 | [diff] [blame^] | 45 | extern int regulator_init(struct powerdebug_options *options); |
Daniel Lezcano | 30f0147 | 2016-02-18 16:08:10 +0000 | [diff] [blame] | 46 | extern int regulator_dump(void); |
| 47 | |
Daniel Lezcano | b4eec7e | 2016-02-18 16:44:55 +0000 | [diff] [blame^] | 48 | extern int gpio_init(struct powerdebug_options *options); |
Daniel Lezcano | 30f0147 | 2016-02-18 16:08:10 +0000 | [diff] [blame] | 49 | extern int gpio_dump(void); |
| 50 | |
Daniel Lezcano | b4eec7e | 2016-02-18 16:44:55 +0000 | [diff] [blame^] | 51 | extern int sensor_init(struct powerdebug_options *options); |
Daniel Lezcano | 30f0147 | 2016-02-18 16:08:10 +0000 | [diff] [blame] | 52 | extern int sensor_dump(void); |
Daniel Lezcano | b4eec7e | 2016-02-18 16:44:55 +0000 | [diff] [blame^] | 53 | |