← Back to team overview

linaro-pm-wg team mailing list archive

[Bug 1229658] Re: Information is unavailable on "Gpio" page in powerdebug 0.7.1 with vexpress A9 Android.

 

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

-- 
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

To manage notifications about this bug go to:
https://bugs.launchpad.net/linaro-android/+bug/1229658/+subscriptions


Follow ups

References