Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289530
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] Device tree binding documentation for gpio-switch |
| Date | 2015-12-11 13:50 +0100 |
| Message-ID | <qEvj4-4o4-15@gated-at.bofh.it> (permalink) |
| References | <qC2uT-5Kw-37@gated-at.bofh.it> <qC2uV-5Kw-73@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Dec 4, 2015 at 6:31 PM, Martyn Welch
<martyn.welch@collabora.co.uk> wrote:
> This patch adds documentation for the gpio-switch binding. This binding
> provides a mechanism to bind named links to gpio, with the primary
> purpose of enabling standardised access to switches that might be standard
> across a group of devices but implemented differently on each device.
>
> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
As mentioned in the comment to the second patch, this solves the
following generic problem:
Expose a GPIO line to userspace using a specific name
That means basically naming GPIO lines and marking them as
"not used by the operating system".
This is something that has been proposed before, and postponed
because the kernel lacks the right infrastructure.
Markus Pargmann also did a series that add initial values to
hogs, which is the inverse usecase of this, where you want to
*output* something by default, then maybe also make it available
to userspace.
So what we need to see here is a patch series that does all of these
things:
- Name lines
- Sets them to initial values
- Mark them as read-only
- Mark them as "not used by the operating system" so that they
can be default-exported to userspace.
Making *USE* of this naming etc inside the Linux kernel
> + gpio-switch {
> + compatible = "gpio-switch";
> +
> + write-protect {
> + label = "write-protect";
> + gpios = <&gpx3 0 GPIO_ACTIVE_LOW>;
> + read-only;
> + };
This should not need new structures and nodes like this. It should
be part of Documentation/devicetree/bindings/gpio/gpio.txt
and put directly in the gpiochip node.
Maybe as an extension of the existing hogs, but that has already
been tried.
While we can agree on a device tree binding, the kernel still needs
major refactoring to actually expose named GPIOs to userspace,
and that should be done using the new chardev, not with sysfs
links.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
[PATCH 2/3] Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
[PATCH] fix noderef.cocci warnings kbuild test robot <lkp@intel.com> - 2015-12-04 19:20 +0100
Re: [PATCH 2/3] Add support for monitoring gpio switches kbuild test robot <lkp@intel.com> - 2015-12-04 19:20 +0100
Re: [PATCH 2/3] Add support for monitoring gpio switches Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-04 20:00 +0100
Re: [PATCH 2/3] Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-05 11:50 +0100
Re: [PATCH 2/3] Add support for monitoring gpio switches Linus Walleij <linus.walleij@linaro.org> - 2015-12-11 10:10 +0100
Re: [PATCH 2/3] Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-16 11:20 +0100
Re: [PATCH 2/3] Add support for monitoring gpio switches Linus Walleij <linus.walleij@linaro.org> - 2015-12-22 10:30 +0100
[PATCH 1/3] Device tree binding documentation for gpio-switch Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Rob Herring <robh@kernel.org> - 2015-12-07 18:40 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-07 22:20 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Linus Walleij <linus.walleij@linaro.org> - 2015-12-11 13:50 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Rob Herring <robh+dt@kernel.org> - 2015-12-11 15:10 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Linus Walleij <linus.walleij@linaro.org> - 2015-12-14 15:30 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Rob Herring <robh+dt@kernel.org> - 2015-12-14 16:50 +0100
Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Markus Pargmann <mpa@pengutronix.de> - 2015-12-15 10:20 +0100
[PATCH 3/3] ARM: dts: Addition of binding for gpio switches on peach-pi Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
csiph-web