diff options
author | Amit Arora <amit.arora@linaro.org> | 2010-08-03 10:15:20 +0530 |
---|---|---|
committer | Amit Arora <amit.arora@linaro.org> | 2010-08-03 10:15:20 +0530 |
commit | e9e16b0ae8add42168c68e9d8bbd27d97fa944bd (patch) | |
tree | 9d9734e227bf83e15e770975ecacbc71ae49868c /powerdebug.h | |
download | powerdebug-e9e16b0ae8add42168c68e9d8bbd27d97fa944bd.tar.gz |
New powerdebug tool
This is a new tool to show some of the information which powertop doesn't - like, information for sensor, regulator etc.
Diffstat (limited to 'powerdebug.h')
-rw-r--r-- | powerdebug.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/powerdebug.h b/powerdebug.h new file mode 100644 index 0000000..b8aee35 --- /dev/null +++ b/powerdebug.h @@ -0,0 +1,30 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <dirent.h> +#include <getopt.h> +#include <errno.h> + +//#define PATH_MAX 1024 +//#define NAME_MAX 128 +#define VALUE_MAX 16 + +struct regulator_info { + char name[NAME_MAX]; + char state[VALUE_MAX]; + char status[VALUE_MAX]; + char type[VALUE_MAX]; + char opmode[VALUE_MAX]; + int microvolts; + int microamps; + int num_users; +} *regulators_info; + +extern int numregulators; + +extern void usage(char **argv); +extern void print_regulator_info(int verbose); +extern void get_sensor_info(char *path, char *name, char *sensor, int verbose); + + |