RE: [PATCH v2 4/4] da850-evm: add baseboard UI expander buttons,switches and LEDs

From: Nori, Sekhar
Date: Mon Nov 22 2010 - 07:00:46 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/