lkml.org 
[lkml]   [2010]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH v2 4/4] da850-evm: add baseboard UI expander buttons, switches and LEDs
Hi Ben,

On Fri, Nov 19, 2010 at 21:10:50, Ben Gardiner wrote:

> >> [...]
> >
> > How does gpio_request prevent sysfs control?
>
> To obtain access to a gpio through the sysfs interface the user must
> first write the gpio number to 'export'. When the gpio has been
> gpio_request()'d the result of writing to 'export' is nothing; whereas
> writing to export would normally result in the appearance of a named
> gpio line alongside 'export'.
>
> I hope the following commands and their output illustrate my point:
>
> $ cd /sys/class/gpio/
> $ ls
> export gpiochip128 gpiochip160 gpiochip64 unexport
> gpiochip0 gpiochip144 gpiochip32 gpiochip96
> $ echo 160 > export
> $ ls
> export gpiochip128 gpiochip160 gpiochip64 unexport
> gpiochip0 gpiochip144 gpiochip32 gpiochip96
> $ echo 163 > export
> $ ls
> export gpiochip128 gpiochip160 gpiochip64 tp_22
> gpiochip0 gpiochip144 gpiochip32 gpiochip96 unexport

Thanks for the explanation. I should have probably asked
earlier, why do we need to prevent sysfs access of
deep sleep enable and sw reset pins? We don't seem to be
using them in the kernel either.

Thanks,
Sekhar



\
 
 \ /
  Last update: 2010-11-22 13:03    [W:0.087 / U:3.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site