[Voyage-linux] About GPIO support
Stéphane Acounis
(spam-protected)
Thu Feb 10 19:35:39 HKT 2011
Le Thu, 10 Feb 2011 10:37:26 +0100
Stéphane Acounis <stephane.acounis at subatech.in2p3.fr> a écrit:
> Le Thu, 10 Feb 2011 09:36:20 +0800
> "Kim-man 'Punky' TSE" <punkytse at punknix.com> a écrit:
>
> > Why not using the stock one but instead of this patch?
>
> Hi Kim,
>
> And so, practically, how do you access the switch (GPIO24) with the
> stock kernel?
> I'd like to be able to sense the switch in order to make a poweroff
> button.
>
> Thanks.
>
OK, I know, I should have searched a little bit by myself before asking
the list.
The state of the button can be monitored with this line:
od -x /dev/cs5535_gpio24 | cut -c 11-12 | head -1
it reads 31 in the idle state and 30 if the button is pressed.
--
Stéphane ACOUNIS
SUBATECH Nantes - Service d'Électronique
Tél: 02-51-85-84-28 06-64-62-99-20
«Faut pas se laisser abattre» devise Kennedy
More information about the Voyage-linux
mailing list