linaro-pm-wg team mailing list archive
-
linaro-pm-wg team
-
Mailing list archive
-
Message #00513
Re: [Bug 1229658] Re: Information is unavailable on "Gpio" page in powerdebug 0.7.1 with vexpress A9 Android.
Hi Meraj,
Your patch assumes the gpio numbers sequentially listed in the debug
file, which is a wrong assumption. It will export gpios which are not
listed.
e.g. below is the gpio debug info for panda
GPIOs 0-31, gpio:
gpio-0 (tfp410 PD ) out lo
gpio-1 (hsusb1_vbus ) out hi
GPIOs 32-63, gpio:
gpio-41 (hdmi_ls_oe ) out lo
gpio-43 (vwl1271 ) out hi
gpio-60 (hdmi_ct_cp_hpd ) out hi
gpio-62 (hsusb1_phy.8 ) out hi
gpio-63 (hdmi_hpd ) in lo IRQ
GPIOs 64-95, gpio:
GPIOs 96-127, gpio:
gpio-127 (audpwron ) out hi
GPIOs 128-159, gpio:
GPIOs 160-191, gpio:
On Monday 26 May 2014 02:43 PM, Mohammad Merajul Islam Molla wrote:
> Hello Sanjay/Botao,
>
> It looks like there is a problem in the code portion below -
>
> while (read = getline(&line, &len, fgpio) != -1) {
> char *str;
>
> if (strstr(line, "gpio-")) {
> str = strtok(line, " ");
> sscanf(str, "gpio-%d", &gpio[num]);
> fprintf(fgpio_export, "%d", gpio[num]);
> num++;
> }
>
> /sys/kernel/debug/gpio will have lines as below only if those gpio pins
> have already been exported by writing to /sys/class/gpio/export file -
>
> gpio-1 (sysfs ) in hi
> gpio-2 (sysfs ) in lo
> gpio-3 (sysfs ) in hi
> gpio-4 (sysfs ) in lo
> gpio-5 (sysfs ) in lo
> gpio-6 (sysfs ) in hi
> gpio-7 (sysfs ) in hi
>
>
> I have attached a patch which fixes the problem. Now it dynamically determines maximum number of gpios on the platform and exports those via /sys/class/gpio/export file.
>
> Please review/comment/test the patch attached.
>
> *** NOTE: The earlier patch (mentioned above) is no longer necessary.
> This patch contains all the other fixes too.
>
>
> Thanks,
> -Meraj
>
> ** Attachment added: "powerdebug_gpio_info_patch"
> https://bugs.launchpad.net/linaro-powerdebug/+bug/1229658/+attachment/4119672/+files/powerdebug_gpio_info_patch
>
--
sanjay
--
You received this bug notification because you are a member of Linaro
Powerdebug Commits, which is subscribed to Linaro PMWG Powerdebug.
Matching subscriptions: powerdebug commits
https://bugs.launchpad.net/bugs/1229658
Title:
Information is unavailable on "Gpio" page in powerdebug 0.7.1 with
vexpress A9 Android.
Status in Linaro Android:
New
Status in Powerdebug - a tool to help ARM developers:
In Progress
Bug description:
On ARM Versatile Express A9 board with Linaro Android image:
https://android-build.linaro.org/builds/~linaro-android/vexpress-
linaro-13.09-release/#build=6
Information is unavailable on "Clocks" & "Gpio" after launched
powerdebug version 0.7.1, error output shows as below:
root@vexpress:/ # powerdebug
failed to initialize clock details (check debugfs)
error: unable to open directory /sys/class/gpio
failed to initialize gpios
root@vexpress:/ #
Please refer to attachment to get snapshot pictures.
Note:
Please run powerdebug in ADB shell, which the output is well
formatted, however the failure is same as run in serial console.
Latest update for this bug is the behaviour shows as described in
comment #9, only GPIO information is unavailable.
For the bug on Samsung Arndale Android, please refer to:
https://bugs.launchpad.net/linaro-powerdebug/+bug/1298171
###########################################
This issue is observed on following images:
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-13.09-release/#build=6
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-13.11-release/#build=2
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-13.12-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.01-release/#build=6
###########################################
From build #247, only "Gpio" page is empty:
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro/#build=247
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.02-release/#build=11
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro/#build=271
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.03-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro/#build=297
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.04-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro/#build=331
https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.05-release/#build=2
########################################
Also observed with Panda Android Kitkat build
https://android-build.linaro.org/builds/~linaro-android-member-ti
/panda-linaro-14.05-release/#build=1
To manage notifications about this bug go to:
https://bugs.launchpad.net/linaro-android/+bug/1229658/+subscriptions
References