Age | Commit message (Collapse) | Author |
|
This patch adds support to dump/display the powerdomain statistics
in powerdebug.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
This patch adds functions for file open, file read line and
file close.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
This patch changes the short option for findparents from -p to
-f so that -p can be used for power domains.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
This patch adds info about -g/--gpio option in the usage section.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
The ordering of the display options was not matching with
the order of the windows defined in display.h causing GPIO and
CLOCK display to seg fault/not work. This patch fixes this issue.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
Some of the regulator info were being read in as an integer
to a character buffer which was causing the info to be garbled and
wrong. This patch fixes the issue by reading in the info as a string
and then converting it into integer.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
This patch adds the check whether the terminal supports colors
and allows changing color definitions before actually attempting to
redifine the color definitions. Without this check, attempting to
change color definitions in a color not supported terminal
causes a hang.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
The regulator, gpio, sensor and clock tree pointers were
initialized only during the display option and not during the
dump only option. This meant the dump option was not printing
any info previously. This patch fixes it by initilaizing the
tree pointers during the dump only option.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
|
|
The previous patch was reverted and is replaced by this one.
Instead of dancing around with global flag telling if a subsys succeed
or not and write a error, let's try to initialize the subsystem each
time a display is requested and output an error occurs.
That makes the code a bit nicer and give the opportunity to fix the
problem at the system level (eg. mount debugfs) without restarting
powerdebug.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
This reverts commit 96f6e050107da5d258280b785e5ed410d534a775.
Conflicts:
gpio.c
regulator.c
sensor.c
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Rename variable 'read' by 'nrread'.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The SIGWINCH signal handler calls a display function. For this
we exported the handler in powerdebug.c.
That does not make sense, let's move the signal setup in display.c
directly.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Currently the default refresh rate is 10 secs which is tooo long for
data inspection. Let's reduce it to 1 sec.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The window refresh does not work at all. When the mainloop exits, nothing
is done to refresh the current window.
Fix this by sending to ourself a SIGWINCH signal, so the display engine
will automatically catch the signal and refresh the current window.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
There is no logic behind the default window selection. The last
option parsed set the default window. Instead of having a specific
boolean set, use the first bit found in the flags for selecting the
the windows.
eg. powerdebug -s -g
=> flags = SENSOR_OPTION | GPIO_OPTION;
=> flags = 0x2 | 0x8 = 0x0a
=> flags = b01010000
=> fsl(flags) = 2
=> default window = 1 << fsl(flags) - 1
=> default window = 1 << 2 - 1
=> default window = 1 << 1
=> default window = 2 = SENSOR_OPTION
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
That has the benefit to simplify the code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Vishal Bhoj <vishal.bhoj@hackbox.linaro.org>
|
|
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- gpio: export free gpios to user
- fix minor errors and warnings
- display error on module window
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- GPIOs in the SoC will be free/used state, this patch make free gpios
accessible to the user by exporting them.
- bug 1229658
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- Currently errors are displayed on stdout. This patch puts the
error on subscreens also.
- bug 1298171
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
gpio: add function to export gpios to user
readme update
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
Many platforms don't have gpio signals available to userspace
in gpio class. This function adds support to export gpios.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
fixed error shown clock rates.
fixed no refresh of regulator and sensor values after "R" key pressed.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
When gpio direction was changed from IN to OUT though sysfs. gpio
value would changed to zero. So after gpio direction changed, we
must read gpio value again.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
1. check clock rate is reported by hexadecimal or decimal.
2. clock rate is reported with interger instead of radix point,
for example 1.1GHz must be shown in 1100MHz.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
When clock is large than 2GHz, clock rate will overflow for using
int type. So change clock rate type to unsigned int. Then clock
rate can reach 4GHz.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
Fix this bug, and read regulator and sensor datas again when "R"
key pressed.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
add gpio modification function.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
|
|
For power consumption test, we can change gpio direction and value
and check that power consumption is falled or not.
use 'D' key to change gpio direction.
And when gpio direction is "out", use 'V' key to change gpio value.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
In gpio sysfs, direction and egde is shown in string.
dierction value is "in" or "out".
And egde value is "none", "falling", "rising" or "both".
So string must be shown also in powerdebug tool.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
- support for detecting multiple key values which varies for
vendors.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- fixed https://bugs.launchpad.net/linaro-powerdebug/+bug/1014667
- fixed https://bugs.launchpad.net/linaro-powerdebug/+bug/827828
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
support multiple possible values of ENTER key
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
Because in some keyboard ENTER key value is '\n', so we must add this
value for ENTER key triggled.
Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com>
|
|
- hande winch signal
- report errors with proper message
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- bug : https://bugs.launchpad.net/linaro-powerdebug/+bug/1014667
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- handle winch to display window properly
- bug: https://bugs.launchpad.net/linaro-powerdebug/+bug/827828
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
|
|
- 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>
|
|
- added support for common clock framework
- added regulator related information
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.com>
|
|
Add information about the regulator state and status field.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.com>
|
|
In common clock framework (merged in 3.8-rc1) the directory
and attributes are changed, adapt to the new clock entries in
debugfs.
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.com>
|