blob: 2df0a2721269025bf56f3b52bd1135932c74247b [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
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000024#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 Lezcano30f01472016-02-18 16:08:10 +000035struct powerdebug_options {
36 int flags;
37 unsigned int ticktime;
38 int selectedwindow;
39 char *clkname;
40};
41
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000042extern int clock_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000043extern int clock_dump(char *clk);
44
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000045extern int regulator_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000046extern int regulator_dump(void);
47
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000048extern int gpio_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000049extern int gpio_dump(void);
50
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000051extern int sensor_init(struct powerdebug_options *options);
Daniel Lezcano30f01472016-02-18 16:08:10 +000052extern int sensor_dump(void);
Daniel Lezcanob4eec7e2016-02-18 16:44:55 +000053