All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH  0/2] gpio: Allow userspace export from DT
@ 2015-04-13 11:05 ` Martin Fuzzey
  0 siblings, 0 replies; 35+ messages in thread
From: Martin Fuzzey @ 2015-04-13 11:05 UTC (permalink / raw)
  To: Alexandre Courbot, Linus Walleij, Rob Herring
  Cc: linux-gpio, linux-arm-kernel, devicetree

Currently the gpio sysfs interface allows userspace to access simple hardware
where no kernel driver exists or would be useful.

However it requires userspace to know the gpio number that has been assigned
by the kernel.

That number, in the case of gpio drviers using dynamic allocation, is not fixed,
and may change when:
* The kernel version changes and ARCH_NR_GPIOS is changed (happened in 3.17)
* The kernel version changes and probe order changes for gpio chips.
* The kernel configuration is changed if CONFIG_ARCH_NR_GPIO is used
* The board is redesigned (eg switching an externally visible signal from a
SoC provided GPIO to an I2C expander chip or vice versa).
* Other GPIO chips are added to the system.

The above means that, in order to export the GPIO to userspace via
/sys/class/gpio/export the userspace code must know the exact hardware and
kernel version information.

Furthermore, in many cases, it makes no sense to allow userspace to change the
signal direction; even if the GPIO itself allows it the circuitry connected
to the pin often does not (eg a signal dedicated to an output function driving
a  transistor).

This patch series solves both problems by performing the external
signal => GPIO mapping in the device tree.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2015-05-08 10:04 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 11:05 [PATCH 0/2] gpio: Allow userspace export from DT Martin Fuzzey
2015-04-13 11:05 ` Martin Fuzzey
2015-04-13 11:05 ` [PATCH 1/2] Doc: DT: Add binding document for GPIO exporter Martin Fuzzey
2015-04-13 11:05   ` Martin Fuzzey
2015-04-13 11:05 ` [PATCH 2/2] gpio: add driver to export DT configured GPIOs to userspace Martin Fuzzey
2015-04-13 11:05   ` Martin Fuzzey
2015-04-15 13:19 ` [PATCH 0/2] gpio: Allow userspace export from DT Rob Herring
2015-04-15 13:19   ` Rob Herring
     [not found]   ` <CAL_JsqJorndYh4ROdKbJfpG1KY=Xosjc6BMFYRPrb+BsauFsnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-28 12:56     ` Linus Walleij
2015-04-28 12:56       ` Linus Walleij
2015-05-04  8:49 ` Johan Hovold
2015-05-04  8:49   ` Johan Hovold
2015-05-06  7:22   ` Linus Walleij
2015-05-06  7:22     ` Linus Walleij
2015-05-06 13:06     ` Johan Hovold
2015-05-06 13:06       ` Johan Hovold
2015-05-06 17:56       ` Fuzzey, Martin
2015-05-06 17:56         ` Fuzzey, Martin
2015-05-08  9:31         ` Johan Hovold
2015-05-08  9:31           ` Johan Hovold
2015-05-06 13:19     ` Rob Herring
2015-05-06 11:24   ` Russell King - ARM Linux
2015-05-06 11:24     ` Russell King - ARM Linux
2015-05-06 12:43     ` Johan Hovold
2015-05-06 12:43       ` Johan Hovold
2015-05-06 12:57       ` Russell King - ARM Linux
2015-05-06 12:57         ` Russell King - ARM Linux
     [not found]         ` <20150506125707.GV2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-05-06 13:25           ` Johan Hovold
2015-05-06 13:25             ` Johan Hovold
2015-05-07  5:38             ` Jiří Prchal
2015-05-07  5:38               ` Jiří Prchal
2015-05-07 12:28             ` Russell King - ARM Linux
2015-05-07 12:28               ` Russell King - ARM Linux
     [not found]               ` <20150507122840.GB2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-05-08 10:04                 ` Johan Hovold
2015-05-08 10:04                   ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.