All of lore.kernel.org
 help / color / mirror / Atom feed
From: florian.vaussard@epfl.ch (Florian Vaussard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] gpiolib: add gpio_export_with_name
Date: Thu, 30 May 2013 22:38:37 +0200	[thread overview]
Message-ID: <51A7B8CD.4080702@epfl.ch> (raw)
In-Reply-To: <CACRpkdb9F+wJ0hkNqPTP34r3JAEp2s07Q8U24fD6oCdj7MqCFA@mail.gmail.com>

Hello Linus,

On 05/30/2013 10:03 PM, Linus Walleij wrote:
> On Thu, May 30, 2013 at 11:19 AM, Florian Vaussard
> <florian.vaussard@epfl.ch> wrote:
>
>> 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.
>
> Which are these?
>

Sorry, I should have been more precise.

> When I have inquired I have heard all kind of horrible things:
>
> - Userspace replicating drivers/leds/leds-gpio.c to
>    turn on/off and even PWM (!) LEDs from userspace, when we have
>    a standard sysfs interface for LEDs.
>
> - Userspace replicating drivers/input/keyboard/gpio_keys[_polled].c
>    to "just read this one button" instead of going through the
>    Linux input subsystem like everyone else.
>
> - Userspace replicating drivers/regulator/gpio-regulator.c
>    to "turn on just this one voltage source".
>
> All invalid reasons for using the sysfs ABI and trying to do the
> kernels work. All creating horrs for users and developers who now
> have to stash everything were trying to stach into the device tree
> (the above is all perfectly expressed with DT nodes) into their
> userspace app and then requiring their users to match a certain
> app to a certain board.
>

100% agree with you.

> The only examples I've really come to accept considers using
> things like relays and switches on factory lines where the meaning
> (semantics) of the GPIOs can only be properly understood from the
> GUI in the userspace APP running that factory line. Or robotics.
> In both cases presumably RT processes.
>

Indeed, I work in a robotics lab :-) One of our board (mach-imx/
mx31moboard*.c) controls for example the multiplexing of two cameras
sharing the same acquisition bus (I know, a bit hackish).
I developed a similar board with an OMAP3. Such control do not
fit well in the above-mentioned cases, but we do not need RT processes.

Best regards,

Florian

WARNING: multiple messages have this Message-ID (diff)
From: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 1/2] gpiolib: add gpio_export_with_name
Date: Thu, 30 May 2013 22:38:37 +0200	[thread overview]
Message-ID: <51A7B8CD.4080702@epfl.ch> (raw)
In-Reply-To: <CACRpkdb9F+wJ0hkNqPTP34r3JAEp2s07Q8U24fD6oCdj7MqCFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hello Linus,

On 05/30/2013 10:03 PM, Linus Walleij wrote:
> On Thu, May 30, 2013 at 11:19 AM, Florian Vaussard
> <florian.vaussard-p8DiymsW2f8@public.gmane.org> wrote:
>
>> 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.
>
> Which are these?
>

Sorry, I should have been more precise.

> When I have inquired I have heard all kind of horrible things:
>
> - Userspace replicating drivers/leds/leds-gpio.c to
>    turn on/off and even PWM (!) LEDs from userspace, when we have
>    a standard sysfs interface for LEDs.
>
> - Userspace replicating drivers/input/keyboard/gpio_keys[_polled].c
>    to "just read this one button" instead of going through the
>    Linux input subsystem like everyone else.
>
> - Userspace replicating drivers/regulator/gpio-regulator.c
>    to "turn on just this one voltage source".
>
> All invalid reasons for using the sysfs ABI and trying to do the
> kernels work. All creating horrs for users and developers who now
> have to stash everything were trying to stach into the device tree
> (the above is all perfectly expressed with DT nodes) into their
> userspace app and then requiring their users to match a certain
> app to a certain board.
>

100% agree with you.

> The only examples I've really come to accept considers using
> things like relays and switches on factory lines where the meaning
> (semantics) of the GPIOs can only be properly understood from the
> GUI in the userspace APP running that factory line. Or robotics.
> In both cases presumably RT processes.
>

Indeed, I work in a robotics lab :-) One of our board (mach-imx/
mx31moboard*.c) controls for example the multiplexing of two cameras
sharing the same acquisition bus (I know, a bit hackish).
I developed a similar board with an OMAP3. Such control do not
fit well in the above-mentioned cases, but we do not need RT processes.

Best regards,

Florian

  reply	other threads:[~2013-05-30 20:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 10:12 [PATCH 0/2] gpio: dt: add gpio-export support Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 10:12 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 10:14 ` [PATCH 1/2] gpiolib: add gpio_export_with_name Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 10:14   ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 10:14   ` [PATCH 2/2] gpiolib-of: ad gpio-export support Jean-Christophe PLAGNIOL-VILLARD
2012-11-21 10:14     ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-26 13:59   ` [PATCH 1/2] gpiolib: add gpio_export_with_name Grant Likely
2012-11-26 13:59     ` Grant Likely
2012-11-28 20:19     ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-28 20:19       ` Jean-Christophe PLAGNIOL-VILLARD
2012-12-18  6:04       ` Jean-Christophe PLAGNIOL-VILLARD
2012-12-18  6:04         ` Jean-Christophe PLAGNIOL-VILLARD
2012-12-19 13:11         ` Grant Likely
2012-12-19 13:11           ` Grant Likely
2013-05-30  9:19     ` Florian Vaussard
2013-05-30  9:19       ` Florian Vaussard
2013-05-30 20:03       ` Linus Walleij
2013-05-30 20:03         ` Linus Walleij
2013-05-30 20:38         ` Florian Vaussard [this message]
2013-05-30 20:38           ` Florian Vaussard
2013-05-30 21:11           ` Linus Walleij
2013-05-30 21:11             ` Linus Walleij
2013-05-31  8:17             ` Florian Vaussard
2013-05-31  8:17               ` Florian Vaussard
2012-11-21 14:43 ` [PATCH 0/2] gpio: dt: add gpio-export support Linus Walleij
2012-11-21 14:43   ` Linus Walleij
2012-11-24 18:48   ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-24 18:48     ` Jean-Christophe PLAGNIOL-VILLARD
2012-12-01 16:56     ` Linus Walleij
2012-12-01 16:56       ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51A7B8CD.4080702@epfl.ch \
    --to=florian.vaussard@epfl.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.