Version 0.6.2

- include gpio debug module for android
- fix compliation issue and set env variables needed for android

Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.com>
diff --git a/Android.mk b/Android.mk
index e062c1c..36c73cd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -29,6 +29,6 @@
 
 LOCAL_SRC_FILES += \
 	powerdebug.c sensor.c clocks.c regulator.c \
-	display.c tree.c utils.c mainloop.c
+	display.c tree.c utils.c mainloop.c gpio.c
 
 include $(BUILD_EXECUTABLE)
diff --git a/powerdebug.c b/powerdebug.c
index cc9e871..073fd42 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -216,6 +216,16 @@
 	struct powerdebug_options *options;
 	int ret;
 
+#ifdef __ANDROID__
+	if (setenv("TERM", "xterm", 1) < 0) {
+		fprintf(stderr, "setenv failure");
+		return 1;
+	}
+	if (setenv("TERMINFO", "/system/etc/terminfo", 1) < 0) {
+		fprintf(stderr, "setenv failure");
+		return 1;
+	}
+#endif
 	options = powerdebug_init();
 	if (!options) {
 		fprintf(stderr, "not enough memory to allocate options\n");
diff --git a/regulator.c b/regulator.c
index 55bd3e9..0da924a 100644
--- a/regulator.c
+++ b/regulator.c
@@ -90,13 +90,17 @@
 		printf("\n%s:\n", tree->name);
 
 	for (i = 0; i < nregdata; i++) {
+		int val;
 
 		if (file_read_value(tree->path, regdata[i].name,
 				    regdata[i].ifmt, buffer))
 			continue;
 
-		printf(regdata[i].ofmt, regdata[i].derefme ?
-		       *((int *)buffer) : buffer);
+		if (regdata[i].derefme) {
+			val = atoi(buffer);
+			printf(regdata[i].ofmt, val);
+		} else
+			printf(regdata[i].ofmt, buffer);
 	}
 
 	return 0;