This patchset introduce a tree structure to store information found in the different directories we are looking for the power management.
The code clock has been replaced by a new code based on this tree.
The result is a code modular and generic enough to be used for the other power management blocks and to add more blocks like the gpio and the thermal framework.
The patch 'rewrite the powerdebug clock code' has been folded in a single one because it was too hard to review the patchset itself.
The display code has been reworked to be generic too but it is still focused on the clock display for the moment.
The following bugs were fixed too: * https://bugs.launchpad.net/linaro-pm-wg/+bug/794725 * https://bugs.launchpad.net/linaro-pm-wg/+bug/794726 * https://bugs.launchpad.net/linaro-pm-wg/+bug/794728 * https://bugs.launchpad.net/linaro-pm-wg/+bug/794731
The drawback is the find clock interface is broken so it is disabled for the moment. It will be enabled again with the next patchset coming next week.
Daniel Lezcano (23): move clock_info structure definition reorganize code to prevent forward declaration provide a clock allocator remove unused variable fix segfault when the default window is not the clock refresh the windows instead of killing them and recreate tree structure abstraction for directory hierarchies function helper to read the files use the tree code to dump the clocks Remove old clock tree dump code add 'find' function for the tree use 'find' tree function remove unused parameter remove unused parameter 'options->dump' remove unused code and parameter for clock dump function remove unused 'verbose' option add a function to browse at reverse order the tree make the mainloop immune against the signals add a tree function to return a list of elements compute the number of children for a specific node document the tree code rewrite the powerdebug clock code remove unused 'hrow' and 'selected' parameters
Makefile | 2 +- clocks.c | 639 ++++++++++++++++++++++++---------------------------------- clocks.h | 13 -- display.c | 229 +++++++++++++++------- powerdebug.c | 90 +++++---- powerdebug.h | 26 ++- tree.c | 353 ++++++++++++++++++++++++++++++++ tree.h | 54 +++++ 8 files changed, 890 insertions(+), 516 deletions(-) create mode 100644 tree.c create mode 100644 tree.h