Rewrite the sensor code with the tree
Use the tree to build a sensor tree and make the code consistent
with the other pm blocks.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
diff --git a/powerdebug.c b/powerdebug.c
index a303757..641673b 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -335,7 +335,7 @@
read_and_dump_clock_info(options->clkname);
if (options->sensors)
- read_and_print_sensor_info(options->verbose);
+ sensor_dump();
return 0;
}
@@ -392,6 +392,11 @@
options->clocks = false;
}
+ if (sensor_init()) {
+ printf("failed to initialize sensors\n");
+ options->sensors = false;
+ }
+
ret = options->dump ? powerdebug_dump(options) :
powerdebug_display(options);