blob: f1dc38233cac8a37867f1ada906cfe418fb48d1a [file] [log] [blame]
Amit Arorae9e16b02010-08-03 10:15:20 +05301#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4#include <string.h>
5#include <dirent.h>
6#include <getopt.h>
7#include <errno.h>
8
Amit Arorafefe8bf2010-08-05 13:31:20 +05309#define VERSION "1.0"
10
Amit Arorae9e16b02010-08-03 10:15:20 +053011#define VALUE_MAX 16
12
13struct regulator_info {
14 char name[NAME_MAX];
15 char state[VALUE_MAX];
16 char status[VALUE_MAX];
17 char type[VALUE_MAX];
18 char opmode[VALUE_MAX];
19 int microvolts;
Amit Arora83faf0e2010-08-05 12:27:42 +053020 int min_microvolts;
21 int max_microvolts;
Amit Arorae9e16b02010-08-03 10:15:20 +053022 int microamps;
Amit Arora83faf0e2010-08-05 12:27:42 +053023 int min_microamps;
24 int max_microamps;
25 int requested_microamps;
Amit Arorae9e16b02010-08-03 10:15:20 +053026 int num_users;
27} *regulators_info;
28
29extern int numregulators;
30
31extern void usage(char **argv);
Amit Arorafefe8bf2010-08-05 13:31:20 +053032extern void version(void);
Amit Arorae9e16b02010-08-03 10:15:20 +053033extern void print_regulator_info(int verbose);
34extern void get_sensor_info(char *path, char *name, char *sensor, int verbose);
Amit Aroradca56d02010-08-05 14:57:22 +053035extern void print_string_val(char *name, char *val);