This patch must be CC to [email protected] as it concerns
device tree bindings. Please also keep Alexandre Courbot in the loop as
he's working on GPIO refactorings.

On Fri, Oct 11, 2013 at 12:05 PM, Jiri Prchal <[email protected]> wrote:

> Add export possibility to sysfs with given name in device tree.
> Rebased from older unapplyed patch: [PATCH] owrt: GPIO: add 
> gpio_export_with_name.
>
> Signed-off-by: Jiri Prchal <[email protected]>

This is a very terse commit message for something which will have
a very drastic impact on the Linux kernel and device tree.

> +3) gpio-export
> +--------------
> +
> +gpio-export will allow you to automatically export gpio


What does this mean? You have to define all terms. And also consider the
audience. If someone is using device tree on Symbian or Windows,
what does "export" mean to them? Not all readers of this document
are Linux implementers.

> +required properties:
> +- compatible: Should be "gpio-export"

If this is a Linux-specific concept it should be named "linux-gpio-export"

But overall I'm not happy with this *at all* as the sysfs ABI is already
enough of a trouble for us. WIth platforms switching to DT-only
probing it would be perfect to get rid of this sysfs interface altogether.

Two questions:

- What do you think of the approach of just not using this for DT
  boots, instead we create a new userspace ABI, using e.g. a
  char device for each GPIO chip like /dev/gpio0, /dev/gpio1 etc
  and access these using ioctl:s?

- I guess you have a specific system in mind for this? What is the
  use case? I have seen *way* too many people trying to reimplement
  drivers/leds/leds-gpio.c
  drivers/input/keyboard/gpio_keys.c
  drivers/input/keyboard/gpio_keys_polled.c
  drivers/power/gpio-charger.c
  drivers/i2c/busses/i2c-gpio.c
  drivers/extcon/extcon-gpio.c
  drivers/spi/spi-gpio.c
  IN USERSPACE! JUST BECAUSE THEY CAN!

>From a kernel developers point of view the kernel shall handle
hardware, so that is why I'm quite picky about this.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to