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

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to