[powerdebug 04/23] remove unused variable

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/display.c b/display.c index 2d63908..2ab2167 100644 --- a/display.c +++ b/display.c @@ -34,11 +34,10 @@ static WINDOW *header_win; static WINDOW *regulator_win; static

[powerdebug 09/23] use the tree code to dump the clocks

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c | 90 +++--- 1 files changed, 86 insertions(+), 4 deletions(-) diff --git a/clocks.c b/clocks.c index 848c52e..5bb04a4 100644 --- a/clocks.c +++ b/clocks.c @@ -42,11 +42,12 @@ struct clock_info

[powerdebug 18/23] make the mainloop immune against the signals

2011-06-08 Thread Daniel Lezcano
... needed at least for gdb ... Signed-off-by: Daniel Lezcano --- powerdebug.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 7d89a7b..8e7e78e 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -288,10 +288,17 @@ int mainloop(struct

[powerdebug 14/23] remove unused parameter 'options->dump'

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |2 +- powerdebug.c |3 +-- powerdebug.h |2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clocks.c b/clocks.c index 8e3509c..5bcef51 100644 --- a/clocks.c +++ b/clocks.c @@ -567,7 +567,7 @@ out: return ret

[powerdebug 07/23] tree structure abstraction for directory hierarchies

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- Makefile |2 +- clocks.c |7 ++ tree.c | 225 ++ tree.h | 45 4 files changed, 278 insertions(+), 1 deletions(-) create mode 100644 tree.c create mode 100644 tree.h diff

[powerdebug 12/23] use 'find' tree function

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c | 192 +++--- tree.c | 11 tree.h |2 + 3 files changed, 71 insertions(+), 134 deletions(-) diff --git a/clocks.c b/clocks.c index 5f494cd..d70d480 100644 --- a/clocks.c +++ b

[powerdebug 06/23] refresh the windows instead of killing them and recreate

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.c| 74 +++-- powerdebug.c |2 +- 2 files changed, 31 insertions(+), 45 deletions(-) diff --git a/display.c b/display.c index 2ab2167..dd5543c 100644 --- a/display.c +++ b/display.c @@ -45,31

[powerdebug 02/23] reorganize code to prevent forward declaration

2011-06-08 Thread Daniel Lezcano
That will cleanup the powerdebug header because these functions are used in the clock code only. Signed-off-by: Daniel Lezcano --- clocks.c | 142 +- powerdebug.h |4 -- 2 files changed, 71 insertions(+), 75 deletions(-) diff

[powerdebug 23/23] remove unused 'hrow' and 'selected' parameters

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |2 +- powerdebug.c | 17 +++-- powerdebug.h |2 +- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/clocks.c b/clocks.c index de5476a..603ebe4 100644 --- a/clocks.c +++ b/clocks.c @@ -392,7 +392,7 @@ int

[powerdebug 13/23] remove unused parameter

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clocks.c b/clocks.c index d70d480..8e3509c 100644 --- a/clocks.c +++ b/clocks.c @@ -213,7 +213,7 @@ int dump_clock_info(void) return tree_for_each(clock_tree

[powerdebug 00/23] Rewrite of the clock code

2011-06-08 Thread Daniel Lezcano
s 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 vari

[powerdebug 03/23] provide a clock allocator

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c | 43 --- powerdebug.h |2 +- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/clocks.c b/clocks.c index 677db01..d08c926 100644 --- a/clocks.c +++ b/clocks.c @@ -451,33 +451,48 @@ static

[powerdebug 20/23] compute the number of children for a specific node

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- tree.c |3 +++ tree.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tree.c b/tree.c index 8f546a9..dd53ff2 100644 --- a/tree.c +++ b/tree.c @@ -57,6 +57,7 @@ static inline struct tree *tree_alloc(const char *path, int depth

[powerdebug 10/23] Remove old clock tree dump code

2011-06-08 Thread Daniel Lezcano
It is replaced by the tree code. Signed-off-by: Daniel Lezcano --- clocks.c | 56 +++- 1 files changed, 3 insertions(+), 53 deletions(-) diff --git a/clocks.c b/clocks.c index 5bb04a4..5f494cd 100644 --- a/clocks.c +++ b/clocks.c @@ -646,59

[powerdebug 17/23] add a function to browse at reverse order the tree

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- tree.c | 14 ++ tree.h |2 ++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/tree.c b/tree.c index 0a9c119..516e832 100644 --- a/tree.c +++ b/tree.c @@ -224,6 +224,20 @@ int tree_for_each(struct tree *tree, tree_cb_t cb, void

[powerdebug 16/23] remove unused 'verbose' option

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |8 +++- powerdebug.c |1 - powerdebug.h |4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/clocks.c b/clocks.c index 9d8108c..e843b9e 100644 --- a/clocks.c +++ b/clocks.c @@ -283,7 +283,7 @@ static void

[powerdebug 01/23] move clock_info structure definition

2011-06-08 Thread Daniel Lezcano
Let's make this structure private Signed-off-by: Daniel Lezcano --- clocks.c | 13 + clocks.h | 13 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clocks.c b/clocks.c index 3a93421..4d8a2be 100644 --- a/clocks.c +++ b/clocks.c @@ -28,6 +

[powerdebug 21/23] document the tree code

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- tree.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/tree.c b/tree.c index dd53ff2..f95610a 100644 --- a/tree.c +++ b/tree.c @@ -227,6 +227,15 @@ int tree_for_each(struct tree *tree, tree_cb_t cb

[powerdebug 08/23] function helper to read the files

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/clocks.c b/clocks.c index 8a2dc97..848c52e 100644 --- a/clocks.c +++ b/clocks.c @@ -13,7 +13,11 @@ * - initial API and

[powerdebug 15/23] remove unused code and parameter for clock dump function

2011-06-08 Thread Daniel Lezcano
the verbose option is unused. Signed-off-by: Daniel Lezcano --- clocks.c | 24 +++- powerdebug.c |9 ++--- powerdebug.h |3 +-- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/clocks.c b/clocks.c index 5bcef51..9d8108c 100644 --- a/clocks.c

[powerdebug 19/23] add a tree function to return a list of elements

2011-06-08 Thread Daniel Lezcano
This patch provides a function returning all the node of the tree matching the substring passed a parameter. Signed-off-by: Daniel Lezcano --- tree.c | 48 tree.h |2 ++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/tree.c

[powerdebug 11/23] add 'find' function for the tree

2011-06-08 Thread Daniel Lezcano
That will be useful to search for a specific node name. Signed-off-by: Daniel Lezcano --- tree.c | 17 + tree.h |2 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/tree.c b/tree.c index e681f4f..7466e31 100644 --- a/tree.c +++ b/tree.c @@ -223,3 +223,20

[powerdebug 05/23] fix segfault when the default window is not the clock

2011-06-08 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |2 +- powerdebug.c | 11 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/clocks.c b/clocks.c index d08c926..ecc72ea 100644 --- a/clocks.c +++ b/clocks.c @@ -255,7 +255,7 @@ int read_and_print_clock_info(int verbose

Re: [PowerManagement] Cpufreq tests scenarii

2011-06-02 Thread Daniel Lezcano
On 06/02/2011 06:14 PM, Paul Larson wrote: On Wed, Jun 1, 2011 at 4:10 AM, Daniel Lezcanowrote: On 06/01/2011 09:59 AM, Paul Larson wrote: I have a board at home I can try to reproduce with if someone on the pm team doesn't. I probably won't be able to get to it until later in the week thoug

Re: [PowerManagement] Cpufreq tests scenarii

2011-06-01 Thread Daniel Lezcano
On 06/01/2011 09:59 AM, Paul Larson wrote: I have a board at home I can try to reproduce with if someone on the pm team doesn't. I probably won't be able to get to it until later in the week though. Ok, thanks very much. I will discuss with the PM team and I will try to get a beagleboardXM.

Re: [PowerManagement] Cpufreq tests scenarii

2011-05-31 Thread Daniel Lezcano
On 05/31/2011 08:48 PM, Paul Larson wrote: Since there is no lp project (that I am aware of) for the pmqa tests, I think I just reported it to Amit directly at the time. Iirc, he said to follow up on it when he had someone working on the qa tests, which appears to be you, so I'm doing that now.

Re: [PowerManagement] Cpufreq tests scenarii

2011-05-31 Thread Daniel Lezcano
this bug please ? What do you mean when you say the they were 'hanging the boards' ? Is the board unresponsive or the qa tests are blocked ? Thanks, Paul Larson On Tue, May 31, 2011 at 10:15 AM, Daniel Lezcano wrote: Here is a bunch of scenarii I am planning to integrate to the pm-

[PowerManagement] Cpufreq tests scenarii

2011-05-31 Thread Daniel Lezcano
Here is a bunch of scenarii I am planning to integrate to the pm-qa package. Any idea or comment will be appreciate. Note the test cases are designed for a specific host configured to have a minimal number of services running on it and without any pending cron jobs. This pre-requisite is needed

[PATCH 3/5] fix display when the default display is not the clock

2011-05-24 Thread Daniel Lezcano
Due to an internal error in clocks.c I am investigating, I am temporarly changing the test in the mainloop to have the clock being initialized when the option is set. Signed-off-by: Daniel Lezcano --- powerdebug.c | 44 +--- 1 files changed, 21

[PATCH 5/5] compute next and previous window with modulo arithmetic

2011-05-24 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index dd4fe91..5fe07de 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -15,6 +15,7 @@ #include #include +#include #include

[PATCH 1/5] Remove pointless compiler flags

2011-05-24 Thread Daniel Lezcano
-Wall already set most the warning flags Signed-off-by: Daniel Lezcano --- Makefile |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ac486d..295b7cb 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ BINDIR=/usr/sbin MANDIR=/usr/share

[PATCH 4/5] make the keyscan code human readable

2011-05-24 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 3e0272f..dd4fe91 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -164,10 +164,10 @@ int keystroke_callback(bool *enter_hit, bool

[PATCH 5/5] compute next and previous window with modulo arithmetic

2011-05-24 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index dd4fe91..5fe07de 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -15,6 +15,7 @@ #include #include +#include #include

[PATCH 3/5] fix display when the default display is not the clock

2011-05-24 Thread Daniel Lezcano
Due to an internal error in clocks.c I am investigating, I am temporarly changing the test in the mainloop to have the clock being initialized when the option is set. Signed-off-by: Daniel Lezcano --- powerdebug.c | 44 +--- 1 files changed, 21

[PATCH 2/5] nit : fix output hexadecimal format

2011-05-24 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/clocks.c b/clocks.c index b556644..3a93421 100644 --- a/clocks.c +++ b/clocks.c @@ -311,7 +311,7 @@ static void add_clock_details_recur(struct clock_info *clock

[PATCH 4/5] make the keyscan code human readable

2011-05-24 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 3e0272f..dd4fe91 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -164,10 +164,10 @@ int keystroke_callback(bool *enter_hit, bool

[PATCH 1/5] Remove pointless compiler flags

2011-05-24 Thread Daniel Lezcano
-Wall already set most the warning flags Signed-off-by: Daniel Lezcano --- Makefile |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ac486d..295b7cb 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ BINDIR=/usr/sbin MANDIR=/usr/share

[PATCH 2/5] nit : fix output hexadecimal format

2011-05-24 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/clocks.c b/clocks.c index b556644..3a93421 100644 --- a/clocks.c +++ b/clocks.c @@ -311,7 +311,7 @@ static void add_clock_details_recur(struct clock_info *clock

Re: [PATCH 1/2] resolve clock_info reallocationg issue

2011-04-07 Thread Daniel Lezcano
On 04/07/2011 10:57 AM, Yong Shen wrote: Hi Daniel, Thanks for the input. I have been trying hard to reproduce this bug, but failed. Is it a random bug or not? No, it happens always. If it is not too trouble, I would appreciate you can help debug, since so far it only happens on your board.

Re: [PATCH 1/2] resolve clock_info reallocationg issue

2011-04-06 Thread Daniel Lezcano
On 04/06/2011 03:28 PM, Yong Shen wrote: Hi Daniel, It runs well on my board so far. I have an igep v2. I will try to do more test to reproduce it. Meanwhile, could you please print your clock tree for me? Using 'powerdebug -cvd'. Sure here it is, I put the result of the 'tree' command and

Re: [PATCH 1/2] resolve clock_info reallocationg issue

2011-04-06 Thread Daniel Lezcano
On 04/05/2011 10:28 AM, yong.s...@linaro.org wrote: From: Yong Shen everytime when screen refresh, the clock_info data stucture will be reacclocated, which does not make sence. This patch addresses this issue. Signed-off-by: Yong Shen Hi Yong, I tried this patch but it segfaults :/ gdb powe

Re: [powerdebug 01/35] change regulator init function

2011-04-05 Thread Daniel Lezcano
On 04/04/2011 11:53 AM, Amit Kucheria wrote: Daniel, I've now reviewed, tested and merged this entire series. Some minor changes were made to a handful of commit messages. Thanks for taking the time to make the changes self-contained, easily bisectable and making sure they don't break builds (I

Re: [PATCH 2/2] Utilize inotify to detect debugfs changes

2011-04-05 Thread Daniel Lezcano
On 04/05/2011 10:28 AM, yong.s...@linaro.org wrote: From: Yong Shen Signed-off-by: Yong Shen --- clocks.c | 54 +- powerdebug.c |3 +++ powerdebug.h |3 +++ 3 files changed, 59 insertions(+), 1 deletions(-) diff --git a/cloc

Re: [powerdebug 01/35] change regulator init function

2011-04-04 Thread Daniel Lezcano
On 04/04/2011 11:53 AM, Amit Kucheria wrote: Daniel, I've now reviewed, tested and merged this entire series. Some minor changes were made to a handful of commit messages. Thanks for taking the time to make the changes self-contained, easily bisectable and making sure they don't break builds (I

Re: [powerdebug 32/35] Remove pointless function definitions

2011-03-28 Thread Daniel Lezcano
On 03/28/2011 08:28 AM, Yong Shen wrote: On Sun, Mar 27, 2011 at 5:06 AM, Daniel Lezcanowrote: By moving the functions in the right order in the file, we can get ride of their definitions and we can set them static. Technically, those function names in head files should be declarations, not d

[powerdebug 35/35] Don't exit when the regulator init fails

2011-03-26 Thread Daniel Lezcano
We just disable the option Signed-off-by: Daniel Lezcano --- powerdebug.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 86f51bc..0f86e0c 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -377,7 +377,7 @@ int main(int argc, char **argv

[powerdebug 34/35] Make some variable static

2011-03-26 Thread Daniel Lezcano
These variable are only used in the sensor.c file. Signed-off-by: Daniel Lezcano --- sensor.c |9 + sensor.h |8 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sensor.c b/sensor.c index f5fcd40..df07593 100644 --- a/sensor.c +++ b/sensor.c @@ -16,6

[powerdebug 32/35] Remove pointless function definitions

2011-03-26 Thread Daniel Lezcano
By moving the functions in the right order in the file, we can get ride of their definitions and we can set them static. Signed-off-by: Daniel Lezcano --- clocks.c | 195 -- clocks.h | 18 -- 2 files changed, 101 insertions

[powerdebug 33/35] create a specific function for display

2011-03-26 Thread Daniel Lezcano
In order to have the code more clear, let's create a function for the display like what we did with the dump function. Signed-off-by: Daniel Lezcano --- powerdebug.c | 45 - 1 files changed, 24 insertions(+), 21 deletions(-) diff --

[powerdebug 31/35] simplify clock_init function

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c | 39 --- clocks.h |2 ++ powerdebug.c | 12 ++-- powerdebug.h |1 - 4 files changed, 12 insertions(+), 42 deletions(-) diff --git a/clocks.c b/clocks.c index 9577267..c83055f 100644 --- a

[powerdebug 30/35] Cleanup the code by removing weird initialization

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 42 -- 1 files changed, 12 insertions(+), 30 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 215b0fe..ef2098c 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -142,19 +142,9 @@ int getoptions

[powerdebug 28/35] Do more error check in display init

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.c| 28 display.h|2 +- powerdebug.c | 10 -- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/display.c b/display.c index cf1d5d7..aee5503 100644 --- a/display.c +++ b/display.c

[powerdebug 29/35] Replace colors definition by enum

2011-03-26 Thread Daniel Lezcano
and reduce the scope by moving it to the c file. Signed-off-by: Daniel Lezcano --- display.c | 10 ++ display.h |9 - 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/display.c b/display.c index aee5503..2d63908 100644 --- a/display.c +++ b/display.c

[powerdebug 26/35] Unify the init function name for display

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.c|2 +- display.h|2 ++ powerdebug.c |3 ++- powerdebug.h |1 - 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/display.c b/display.c index fb252cb..8ea796a 100644 --- a/display.c +++ b/display.c @@ -65,7 +65,7

[powerdebug 25/35] Remove unused variables and definitions

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.h |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/display.h b/display.h index f00a4f8..a73ae43 100644 --- a/display.h +++ b/display.h @@ -13,10 +13,6 @@ * - initial API and implementation

[powerdebug 27/35] mindless - change function name for consistency

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.c| 12 ++-- powerdebug.h |1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/display.c b/display.c index 8ea796a..cf1d5d7 100644 --- a/display.c +++ b/display.c @@ -36,10 +36,6 @@ static char *win_names

[powerdebug 23/35] Remove unused clk_name variable

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/clocks.c b/clocks.c index 2c9597d..5c5c24f 100644 --- a/clocks.c +++ b/clocks.c @@ -20,7 +20,6 @@ #include "clocks.h" static char clk_dir_path[PATH_MAX]; -s

[powerdebug 05/35] make regulator_init to return a regulators_info pointer

2011-03-26 Thread Daniel Lezcano
The regulator_init function does no longer use the global defined function. Signed-off-by: Daniel Lezcano --- powerdebug.c |5 - regulator.c | 18 ++ regulator.h |2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/powerdebug.c b/powerdebug.c

[powerdebug 16/35] split dump and display

2011-03-26 Thread Daniel Lezcano
Let's create a specific function to dump instead of managing with ncurses Signed-off-by: Daniel Lezcano Index: powerdebug/powerdebug.c === --- powerdebug.c | 13 + 1 files changed, 13 insertions(+), 0 dele

[powerdebug 22/35] Reduce dump usage

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 7ef0a22..d337cc8 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -141,13 +141,21 @@ int getoptions(int argc, char *argv

[powerdebug 03/35] browse /sys/class/regulator with a generic name

2011-03-26 Thread Daniel Lezcano
All the files found in the /sys/class/regulator directory should be regulators. Don't assume their name begin with 'regulator'. Signed-off-by: Daniel Lezcano --- regulator.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/regulator.

[powerdebug 24/35] Return an error instead of exiting deeper in the code

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clocks.c b/clocks.c index 5c5c24f..9577267 100644 --- a/clocks.c +++ b/clocks.c @@ -64,7 +64,7 @@ int init_clock_details(bool dump, int selectedwindow

[powerdebug 21/35] improve function to read the file

2011-03-26 Thread Daniel Lezcano
Use a simple function to read the content of the file. Fix the format of the flags which were always zero by reading in heaxdecimal mode. Signed-off-by: Daniel Lezcano --- clocks.c | 37 ++--- 1 files changed, 22 insertions(+), 15 deletions(-) diff --git a

[powerdebug 20/35] change debugfs finder function

2011-03-26 Thread Daniel Lezcano
Change the debugfs_locate_mpoint function to be nicer and more efficient. Another effect is that fixes a segmentation fault when calling powerdebug --dump Signed-off-by: Daniel Lezcano --- clocks.c | 68 + clocks.h |7

[powerdebug 08/35] regulator-8

2011-03-26 Thread Daniel Lezcano
The show_regulator_info function does no longer rely on the global regulators_info variable. Signed-off-by: Daniel Lezcano --- display.c| 20 ++-- powerdebug.c |2 +- powerdebug.h |2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/display.c b

[powerdebug 06/35] pass regulators_info parameter to read_info_from_dirent

2011-03-26 Thread Daniel Lezcano
The read_info_from_dirent does no longer rely on the regulators_info global variable. Signed-off-by: Daniel Lezcano --- regulator.c | 33 ++--- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/regulator.c b/regulator.c index ddbeea3..fc40f27 100644

[powerdebug 18/35] Reduce dump variable usage

2011-03-26 Thread Daniel Lezcano
The modified function are used on the display mode context, we no longer need to pass the dump option. Signed-off-by: Daniel Lezcano --- clocks.c |4 ++-- powerdebug.c |3 +-- powerdebug.h |2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/clocks.c b/clocks.c

[powerdebug 02/35] change regulator functions name

2011-03-26 Thread Daniel Lezcano
Move the corresponding functions to the right header file and rename the function with _function_name. Signed-off-by: Daniel Lezcano --- powerdebug.c |4 ++-- powerdebug.h |4 regulator.c |8 regulator.h |2 ++ 4 files changed, 8 insertions(+), 10 deletions

[powerdebug 01/35] change regulator init function

2011-03-26 Thread Daniel Lezcano
Move the corresponding function to the right header file and rename the function with _function_name. Signed-off-by: Daniel Lezcano --- powerdebug.c |3 ++- powerdebug.h |1 - regulator.c |2 +- regulator.h |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a

[powerdebug 19/35] Remove duplicate findparent variable

2011-03-26 Thread Daniel Lezcano
If we allocate a clock name, that means we can just check with the clock name pointer, no need of the findparent boolean. Signed-off-by: Daniel Lezcano --- powerdebug.c | 39 +-- 1 files changed, 25 insertions(+), 14 deletions(-) diff --git a/powerdebug.c

[powerdebug 17/35] Reduce the usage of the dump variable

2011-03-26 Thread Daniel Lezcano
When we reach the mainloop, that means we are not in dump-mode, so we can remove the test with the dump mode. In the other side, let's use the dump function when we are in dump-mode. Signed-off-by: Daniel Lezcano --- powerdebug.c |

[powerdebug 04/35] Pass regulators_info parameter to regulator_print_info

2011-03-26 Thread Daniel Lezcano
The objective is to make the regulators_info variable local to the main function. This first patch pass the regulators_info variable to the function instead of having this one relying on a global variable definition. Signed-off-by: Daniel Lezcano --- powerdebug.c |2 +- regulator.c | 52

[powerdebug 07/35] pass regulators_info parameter to regulator_read_info

2011-03-26 Thread Daniel Lezcano
The regulator_read_info function does no longer rely on the regulators_info global variable. Signed-off-by: Daniel Lezcano --- powerdebug.c |2 +- regulator.c | 13 ++--- regulator.h |2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/powerdebug.c b

[powerdebug 10/35] pass numregulators parameter to regulator_print_info

2011-03-26 Thread Daniel Lezcano
The regulator_print_info does no longer rely on the numregulators global variable. Signed-off-by: Daniel Lezcano --- powerdebug.c |3 ++- regulator.c |6 +++--- regulator.h |3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index

[powerdebug 11/35] Pass numregulators paramter to regulator_read_info

2011-03-26 Thread Daniel Lezcano
The regulator_read_info does no longer depend no the global variable numregulators. Signed-off-by: Daniel Lezcano --- powerdebug.c |2 +- regulator.c |4 ++-- regulator.h |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index

[powerdebug 09/35] make regulators_info static in powerdebug.c

2011-03-26 Thread Daniel Lezcano
As no function rely on the global variable regulators_info, let's make it static and reduce the scope to powerdebug.c Signed-off-by: Daniel Lezcano --- powerdebug.c |2 ++ powerdebug.h |4 ++-- regulator.h |2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --

[powerdebug 14/35] make regulators_info and numregulators local to main

2011-03-26 Thread Daniel Lezcano
Kill the global variables and make them local to the main function. Signed-off-by: Daniel Lezcano --- powerdebug.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 6dd4b8c..0b26678 100644 --- a/powerdebug.c +++ b

[powerdebug 15/35] Make highlighted_row variable static

2011-03-26 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 0b26678..7eb9c5e 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -18,7 +18,7 @@ #include "regulator.h" #include "power

[powerdebug 13/35] make numregulators static in powerdebug.c

2011-03-26 Thread Daniel Lezcano
Reduce the scope of the numregulators to powerdebug.c Signed-off-by: Daniel Lezcano --- powerdebug.c |1 + powerdebug.h |2 -- regulator.h |2 -- 3 files changed, 1 insertions(+), 4 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 6e9e896..6dd4b8c 100644 --- a

[powerdebug 12/35] Pass numregulators paramter to show_regulator_info

2011-03-26 Thread Daniel Lezcano
The show_regulator_info function does no longer depend no the global variable numregulators. Signed-off-by: Daniel Lezcano --- display.c|4 ++-- powerdebug.c |3 ++- powerdebug.h |3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/display.c b/display.c index

Re: [powerdebug V2: 01/14] encapsulate the options code

2011-03-25 Thread Daniel Lezcano
On 03/25/2011 09:19 AM, Amit Kucheria wrote: Re'adding linaro-dev On 11 Mar 25, Yong Shen wrote: On Fri, Mar 25, 2011 at 2:48 PM, Amit Kucheriawrote: On Fri, Mar 25, 2011 at 4:10 AM, Yong Shen wrote: Hi Daniel, Yes. I had started the work for several days. Previously, every time when clock

Re: [powerdebug V2: 01/14] encapsulate the options code

2011-03-24 Thread Daniel Lezcano
On 03/24/2011 10:09 PM, Amit Kucheria wrote: On 11 Mar 23, Daniel Lezcano wrote: Create a single structure for powerdebug options. Signed-off-by: Daniel Lezcano --- powerdebug.c | 173 +- 1 files changed, 98 insertions(+), 75

Re: [powerdebug V2: 14/14] Add configure framework

2011-03-24 Thread Daniel Lezcano
On 03/24/2011 11:25 AM, Amit Kucheria wrote: On 11 Mar 23, Arnd Bergmann wrote: On Wednesday 23 March 2011, Daniel Lezcano wrote: But anyway, if adding autoconf/automake for powerdebug is a problem, we can drop the two last patches. Amit ? Your other patches certainly look good to me, and

Re: [powerdebug V2: 14/14] Add configure framework

2011-03-23 Thread Daniel Lezcano
On 03/23/2011 03:55 PM, Arnd Bergmann wrote: On Wednesday 23 March 2011, Daniel Lezcano wrote: On 03/23/2011 02:44 PM, Arnd Bergmann wrote: On Wednesday 23 March 2011, Daniel Lezcano wrote: AUTHORS |1 + ChangeLog|1 + Makefile.am | 13 + NEWS

Re: [powerdebug V2: 14/14] Add configure framework

2011-03-23 Thread Daniel Lezcano
On 03/23/2011 02:44 PM, Arnd Bergmann wrote: On Wednesday 23 March 2011, Daniel Lezcano wrote: AUTHORS |1 + ChangeLog|1 + Makefile.am | 13 + NEWS |1 + autogen.sh | 10 ++ configure.ac | 26 ++ Why would

[powerdebug V2: 09/14] reduce scope and make win_names static

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- display.c|5 + powerdebug.c |6 -- powerdebug.h |1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/display.c b/display.c index d3ec421..43db4a4 100644 --- a/display.c +++ b/display.c @@ -30,6 +30,11 @@ static WINDOW

[powerdebug V2: 10/14] make 'dump' variable static

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c | 142 +- clocks.h |1 - powerdebug.c |8 ++-- powerdebug.h |7 +-- 4 files changed, 78 insertions(+), 80 deletions(-) diff --git a/clocks.c b/clocks.c index 9a76c19..ac9aaf5

[powerdebug V2: 01/14] encapsulate the options code

2011-03-23 Thread Daniel Lezcano
Create a single structure for powerdebug options. Signed-off-by: Daniel Lezcano --- powerdebug.c | 173 +- 1 files changed, 98 insertions(+), 75 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 3f4d60c..efdb1a2 100644 --- a

[powerdebug V2: 07/14] save some bytes by using the 'bool' type

2011-03-23 Thread Daniel Lezcano
sizeof(int) : 4 sizeof(bool): 1 Signed-off-by: Daniel Lezcano --- clocks.h |1 - powerdebug.c | 50 ++ powerdebug.h |2 +- regulator.h |1 - 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/clocks.h b/clocks.h

[powerdebug V2: 06/14] encapsulate the keystroke callback

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 160 +++--- 1 files changed, 86 insertions(+), 74 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 71efcd1..73f10dc 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -162,6 +162,87

[powerdebug V2: 04/14] check the return value of init_regulator_ds and fix prototype

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c |3 ++- powerdebug.h |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 7de6ddd..8d74538 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -185,7 +185,8 @@ int main(int argc, char **argv

[powerdebug V2: 03/14] use an int instead of a double

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 05c0e34..7de6ddd 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -125,7 +125,7 @@ int getoptions(int argc, char *argv[], struct

[powerdebug V2: 12/14] make 'selectedwindow' variable static

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- clocks.c |6 +++--- display.c|6 +++--- powerdebug.c | 50 ++ powerdebug.h | 10 -- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/clocks.c b/clocks.c index ac9aaf5

[powerdebug V2: 02/14] save some bytes by allocating dynamically the string option

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index efdb1a2..05c0e34 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -85,7 +85,7 @@ struct powerdebug_options { int sensors

[powerdebug V2: 14/14] Add configure framework

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- AUTHORS |1 + ChangeLog|1 + Makefile.am | 13 + NEWS |1 + autogen.sh | 10 ++ configure.ac | 26 ++ 6 files changed, 52 insertions(+), 0 deletions(-) create mode 100644 AUTHORS

[powerdebug V2: 11/14] move the 'dump' variable to the options structure

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 29 +++-- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 7fa7c82..2de4bd4 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -17,7 +17,6 @@ #include #include

[powerdebug V2: 05/14] encapsulate the mainloop code

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.c | 48 +--- 1 files changed, 29 insertions(+), 19 deletions(-) diff --git a/powerdebug.c b/powerdebug.c index 8d74538..71efcd1 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -162,32 +162,17 @@ int

[powerdebug V2: 13/14] Remove Makefile

2011-03-23 Thread Daniel Lezcano
Remove the Makefile to put in place the next patch where it is generated Signed-off-by: Daniel Lezcano --- Makefile | 26 -- 1 files changed, 0 insertions(+), 26 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index

[powerdebug V2: 08/14] Remove pointless declarations

2011-03-23 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano --- powerdebug.h |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/powerdebug.h b/powerdebug.h index 4a7c9b0..402145b 100644 --- a/powerdebug.h +++ b/powerdebug.h @@ -35,9 +35,6 @@ extern int selectedwindow; extern int numregulators

Re: [powerdebug 01/14] encapsulate the options code

2011-03-23 Thread Daniel Lezcano
On 03/23/2011 12:37 PM, Amit Kucheria wrote: On Tue, Mar 22, 2011 at 1:40 PM, Daniel Lezcano wrote: From: Daniel Lezcano Create a single structure for powerdebug options. Signed-off-by: Daniel Lezcano Hi Daniel, Thanks for this work. Much appreciated. Your first patch doesn't

<    2   3   4   5   6   7   8   >