[PATCH 1/2] gpiolib: add gpio_export_with_name

Florian Vaussard florian.vaussard at epfl.ch
Thu May 30 05:19:33 EDT 2013


Hello Grant,

On 11/26/2012 02:59 PM, Grant Likely wrote:
> On Wed, 21 Nov 2012 11:14:08 +0100, Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> wrote:
>> allow to specify a name to an exported gpio
>>
>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
>
> The gpio sysfs ABI is already horrible, racy, and unsafe. Really, we
> need a proper chrdev interface for controlling gpios. Sysfs is fine for
> poking around and experimenting, but we cannot provide any fine grained
> access control, locking or faster IO with the one-file-per-gpio sysfs
> model. So, no, I don't think this is a good idea to extend gpiolib in
> this way.
>

Would it make sense to provide only the DT binding to export a GPIO,
without changing the sysfs ABI? Even if work is progressing towards
having gpio-controlled reset pins [1], some boards still need GPIOs to
be exported to userspace for other functionalities.

Regards,

Florian

[1] http://article.gmane.org/gmane.linux.power-management.general/31364



More information about the linux-arm-kernel mailing list