blob: a8073a6935ed3f6f05948db4d06744b308d2ed09 [file] [log] [blame]
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00001/*
2 * Power debug tool (powerdebug)
Amit Arora39f29542010-09-14 12:03:22 +05303 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00004 * Copyright (C) 2016, Linaro Limited.
Amit Arora39f29542010-09-14 12:03:22 +05305 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00006 * 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 Arora39f29542010-09-14 12:03:22 +053010 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +000011 * 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 Arora39f29542010-09-14 12:03:22 +053021
Sanjay Singh Rawat781dc312014-06-19 17:56:55 +053022#define VERSION "0.7.3"
Daniel Lezcano30f01472016-02-18 16:08:10 +000023
Thara Gopinath1a32ec02017-07-14 13:15:48 -040024#define CLOCK_OPTION 0x01
25#define REGULATOR_OPTION 0x02
26#define SENSOR_OPTION 0x04
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000027#define GPIO_OPTION 0x08
28
Daniel Lezcano32e6cb52016-02-19 21:16:43 +000029#define VERBOSE_OPTION 0x1000
30#define DUMP_OPTION 0x2000
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000031
32#define DEFAULT_OPTION (REGULATOR_OPTION | SENSOR_OPTION | \
33 CLOCK_OPTION | GPIO_OPTION)
34
Daniel Lezcano30f01472016-02-18 16:08:10 +000035struct powerdebug_options {
36 int flags;
37 unsigned int ticktime;
Daniel Lezcano30f01472016-02-18 16:08:10 +000038 char *clkname;
39};
40
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000041extern int clock_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000042extern int clock_dump(char *clk);
43
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000044extern int regulator_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000045extern int regulator_dump(void);
46
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000047extern int gpio_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000048extern int gpio_dump(void);
49
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000050extern int sensor_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000051extern int sensor_dump(void);
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000052