[Gta04-owner] No /sys/devices/virtual/gpio/gpio145/value in 3.5 kernel?
NeilBrown
neilb at suse.de
Fri Aug 24 09:32:19 CEST 2012
On Thu, 23 Aug 2012 20:59:36 +0200 Radek Polak <psonek2 at seznam.cz> wrote:
> Hi,
> it seems that there is no /sys/devices/virtual/gpio/gpio145/value dir in 3.5
> kernel.
>
> In QtMoko i used it for powering on/off the GPS. I know that GPS is now powered
> on automatically, but still i could use it for 2 things:
>
> I have code in suspend which toggles GPS when the device is suspended and
> immediately wakes.
3.5 kernel does this for you.
>
> I have code in GPS plugin which toggles GPS when there are no data on
> /dev/ttyO1.
3.5 kernel does this for you.
>
> Maybe i could definitely get rid of this (and drop 3.2 kernel support), but
> currently bluetooth is not working for me so it would be regression...
Can you make it conditional on /sys/class/gpio/gpio145 existing? (yes, I
gave a different patch. I have heard it said that you shouldn't hard-code
paths through /sys/devices as they might change. But then I've also heard it
said that /sys/class is going away, along with /sys/bus, to be replaced
by /sys/subsystem. I suspect they stay, at least as symlinks, for a very
long time though).
So if the directory exist, do your magic. If it doesn't, don't?
NeilBrown
>
> Regards
>
> Radek
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo/gta04-owner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120824/e42fbb36/attachment.bin>
More information about the Gta04-owner
mailing list