Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Power debug tool (powerdebug) |
Amit Arora | ed3e565 | 2010-10-27 12:02:53 +0530 | [diff] [blame] | 3 | * |
Daniel Lezcano | 7c15fad | 2016-02-18 15:57:43 +0000 | [diff] [blame] | 4 | * Copyright (C) 2016, Linaro Limited. |
Amit Arora | ed3e565 | 2010-10-27 12:02:53 +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 | ed3e565 | 2010-10-27 12:02:53 +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 | ed3e565 | 2010-10-27 12:02:53 +0530 | [diff] [blame] | 21 | |
Daniel Lezcano | 269de4f | 2011-08-25 15:46:13 +0200 | [diff] [blame] | 22 | enum { CLOCK, REGULATOR, SENSOR, GPIO }; |
Daniel Lezcano | 4120e26 | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 23 | |
Daniel Lezcano | b301b08 | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 24 | struct display_ops { |
Daniel Lezcano | d577aaa | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 25 | int (*display)(bool refresh); |
Daniel Lezcano | b301b08 | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 26 | int (*select)(void); |
Daniel Lezcano | a12163d | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 27 | int (*find)(const char *); |
Daniel Lezcano | 73b4002 | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 28 | int (*selectf)(void); |
Shaojie Sun | 8ac4a2e | 2013-07-29 20:11:46 +0800 | [diff] [blame] | 29 | int (*change)(int keyvalue); |
Daniel Lezcano | b301b08 | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 30 | }; |
Daniel Lezcano | d96731a | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 31 | |
Daniel Lezcano | 5e659d7 | 2016-02-19 20:22:12 +0000 | [diff] [blame] | 32 | struct powerdebug_options; |
| 33 | |
Daniel Lezcano | 971515a | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 34 | extern int display_print_line(int window, int line, char *str, |
| 35 | int bold, void *data); |
Sanjay Singh Rawat | 96f6e05 | 2014-05-26 11:35:02 +0530 | [diff] [blame] | 36 | extern void display_message(int window, char *buf); |
Daniel Lezcano | 971515a | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 37 | |
| 38 | extern int display_refresh_pad(int window); |
| 39 | extern int display_reset_cursor(int window); |
| 40 | extern void *display_get_row_data(int window); |
| 41 | |
Daniel Lezcano | 5e659d7 | 2016-02-19 20:22:12 +0000 | [diff] [blame] | 42 | extern int display_init(struct powerdebug_options *opt); |
Daniel Lezcano | b301b08 | 2011-06-15 15:45:12 +0200 | [diff] [blame] | 43 | extern int display_register(int win, struct display_ops *ops); |
Daniel Lezcano | 372ffba | 2011-06-21 00:57:08 +0200 | [diff] [blame] | 44 | extern int display_column_name(const char *line); |
Nishanth Menon | 962d1c4 | 2011-09-20 11:31:17 +0200 | [diff] [blame] | 45 | |
| 46 | #define NAME_MAX 255 |