* GPIO sysfs 'default' values
@ 2013-02-21 7:11 Tony Prisk
2013-02-21 7:27 ` Tony Prisk
2013-02-21 7:37 ` Lothar Waßmann
0 siblings, 2 replies; 3+ messages in thread
From: Tony Prisk @ 2013-02-21 7:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi Grant, Linus.
I was testing our new gpio/pinctrl driver today and noticed something a
little weird.
I exported gpio0 via sysfs and echoed the direction value - it was 'in'.
This pin is used to control an LCD panel, and is actually in 'out' mode.
If I write 'in' to direction, it changes mode to 'in' and the panel
turns off. Setting it back to 'out' and value=0, and the panel turns on
again.
I noticed that I had no gpiochip->get_direction, so I added it, but the
result was the same.
Any idea what I've missed?
Regards
Tony Prisk
^ permalink raw reply [flat|nested] 3+ messages in thread
* GPIO sysfs 'default' values
2013-02-21 7:11 GPIO sysfs 'default' values Tony Prisk
@ 2013-02-21 7:27 ` Tony Prisk
2013-02-21 7:37 ` Lothar Waßmann
1 sibling, 0 replies; 3+ messages in thread
From: Tony Prisk @ 2013-02-21 7:27 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 2013-02-21 at 20:11 +1300, Tony Prisk wrote:
> Hi Grant, Linus.
>
> I was testing our new gpio/pinctrl driver today and noticed something a
> little weird.
>
> I exported gpio0 via sysfs and echoed the direction value - it was 'in'.
> This pin is used to control an LCD panel, and is actually in 'out' mode.
> If I write 'in' to direction, it changes mode to 'in' and the panel
> turns off. Setting it back to 'out' and value=0, and the panel turns on
> again.
>
> I noticed that I had no gpiochip->get_direction, so I added it, but the
> result was the same.
>
> Any idea what I've missed?
>
> Regards
> Tony Prisk
Sorted it out.
->get_direction was all that was needed.
Apologies,
Tony P
^ permalink raw reply [flat|nested] 3+ messages in thread
* GPIO sysfs 'default' values
2013-02-21 7:11 GPIO sysfs 'default' values Tony Prisk
2013-02-21 7:27 ` Tony Prisk
@ 2013-02-21 7:37 ` Lothar Waßmann
1 sibling, 0 replies; 3+ messages in thread
From: Lothar Waßmann @ 2013-02-21 7:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Tony Prisk writes:
> Hi Grant, Linus.
>
> I was testing our new gpio/pinctrl driver today and noticed something a
> little weird.
>
> I exported gpio0 via sysfs and echoed the direction value - it was 'in'.
> This pin is used to control an LCD panel, and is actually in 'out' mode.
> If I write 'in' to direction, it changes mode to 'in' and the panel
> turns off. Setting it back to 'out' and value=0, and the panel turns on
> again.
>
> I noticed that I had no gpiochip->get_direction, so I added it, but the
> result was the same.
>
> Any idea what I've missed?
>
You missed to report on what platform this happens.
The platform specific GPIO driver obviously does not initialize the
shadow variables for the hardware registers correctly.
Lothar Wa?mann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-21 7:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21 7:11 GPIO sysfs 'default' values Tony Prisk
2013-02-21 7:27 ` Tony Prisk
2013-02-21 7:37 ` Lothar Waßmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox