imx27: pinctrl: GPIO set output value failed

Chris Ruehl chris.ruehl at gtsys.com.hk
Sun Jan 26 21:17:07 EST 2014


Hi Uwe,

On Friday, January 24, 2014 06:11 PM, Uwe Kleine-König wrote:
> Hello Chriss,
>
> [expanded Cc: a bit]
>
> On Wed, Jan 22, 2014 at 05:07:44PM +0800, Chris Ruehl wrote:
>> On Wednesday, January 22, 2014 04:50 PM, Uwe Kleine-König wrote:
>>>> after fix the imx_read_2bit() the registers show the expected values.
>>>> Ergo the problem must be in the gpiolib, my guess
>>>>
>>>> pin 9 (MX27_PAD_LD3) GPIO 1, function 0, direction 1, oconf 3, iconfa 0, iconfb 0
>>>> pin 10 (MX27_PAD_LD4) GPIO 1, function 0, direction 1, oconf 3, iconfa 0, iconfb 0
>>>> pin 11 (MX27_PAD_LD5) GPIO 1, function 0, direction 0, oconf 3, iconfa 0, iconfb 0
>>>> pin 12 (MX27_PAD_LD6) GPIO 1, function 0, direction 1, oconf 3, iconfa 0, iconfb 0
>>> Can dump the gpio register space (e.g. using jtag or memedit)? Then try
>>> something like:
>> memedit can download from your Web right, sadly I didn't have a jtag
>> on my CPU card.
> yeah, http://www.pengutronix.de/software/memedit/downloads/. I think
> there are alternatives, too.
>
> Can you confirm that:
>   # echo 0 > /sys/class/gpio/gpio9/value
>   # echo 0 > /sys/class/gpio/gpio10/value
>   # cat /sys/kernel/debug/gpio
>   ...
>     gpio-9   (sysfs               ) out lo
>     gpio-10  (sysfs               ) out lo
>   ...
>   # echo 1 > /sys/class/gpio/gpio9/value
>   # echo 1 > /sys/class/gpio/gpio10/value
>   # cat /sys/kernel/debug/gpio
>   ...
>     gpio-9   (sysfs               ) out hi
>     gpio-10  (sysfs               ) out lo
>
> But still the pins work as expected, i.e. both are 0 after the first two
> commands and both 1 at the end? Also, are the voltage levels OK?

Yes confirm, the behave and voltage levels are OK.


>
> In a different thread here on lakml
> (http://thread.gmane.org/gmane.linux.ports.arm.kernel/295260/focus=295299)
> it was suggested to implement a per-gpiochip flag to signal if the given
> gpiochip can read from an output. If the above is right, we'd need a
> per-gpio flag instead on i.MX27 (or not set it at all and so loose the
> ability to read from the working pins).
>
> Best regards
> Uwe
>
>
Disclaimer: http://www.gtsys.com.hk/email/classified.html



More information about the linux-arm mailing list