Amit Arora | 1755278 | 2010-12-02 12:23:14 +0530 | [diff] [blame^] | 1 | /******************************************************************************* |
| 2 | * Copyright (C) 2010, Linaro |
| 3 | * Copyright (C) 2010, IBM Corporation |
| 4 | * |
| 5 | * This file is part of PowerDebug. |
| 6 | * |
| 7 | * All rights reserved. This program and the accompanying materials |
| 8 | * are made available under the terms of the Eclipse Public License v1.0 |
| 9 | * which accompanies this distribution, and is available at |
| 10 | * http://www.eclipse.org/legal/epl-v10.html |
| 11 | * |
| 12 | * Contributors: |
| 13 | * Amit Arora <amit.arora@linaro.org> (IBM Corporation) |
| 14 | * - initial API and implementation |
| 15 | *******************************************************************************/ |
| 16 | |
| 17 | #include <stdio.h> |
| 18 | #include <stdlib.h> |
| 19 | #include <unistd.h> |
| 20 | #include <string.h> |
| 21 | #include <dirent.h> |
| 22 | #include <getopt.h> |
| 23 | |
| 24 | #define VALUE_MAX 16 |
| 25 | |
| 26 | struct regulator_info { |
| 27 | char name[NAME_MAX]; |
| 28 | char state[VALUE_MAX]; |
| 29 | char status[VALUE_MAX]; |
| 30 | char type[VALUE_MAX]; |
| 31 | char opmode[VALUE_MAX]; |
| 32 | int microvolts; |
| 33 | int min_microvolts; |
| 34 | int max_microvolts; |
| 35 | int microamps; |
| 36 | int min_microamps; |
| 37 | int max_microamps; |
| 38 | int requested_microamps; |
| 39 | int num_users; |
| 40 | } *regulators_info; |
| 41 | |
| 42 | extern int numregulators; |
| 43 | extern int dump; |
| 44 | |
| 45 | /*extern void usage(char **argv); |
| 46 | extern void print_regulator_info(int verbose); |
| 47 | |
| 48 | extern void init_curses(void); |
| 49 | extern void fini_curses(void); |
| 50 | extern void killall_windows(int all); |
| 51 | extern void show_header(void); |
| 52 | extern void create_windows(void); |
| 53 | extern void create_selectedwindow(void); |
| 54 | extern void show_regulator_info(int verbose); |
| 55 | */ |