linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Addition of kernel
@ 2019-06-17  8:29 Martyn Welch
  2019-06-17  8:38 ` Phil Reid
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Martyn Welch @ 2019-06-17  8:29 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio, kernel

Hi Linus, Bartosz,

We are currently in the position that we would like to pre-configure
some GPIOs at boot time and be able to later affect the state of GPIOs
configured as outputs or read the state of GPIOs previously configured
as inputs.

The device tree property `gpios-line-names` gives a very useful
mechanism for identifying the correct GPIO to use/read for a given
purpose in user space, but doesn't provide any guidance on how that
line is expected to be used. The gpio-hogging functionality enables us
to configure GPIOs during boot, ensuring that the correct state is
present on the relevant GPIO lines, but does not provide the ability to
modify or read these GPIOs at runtime.

I understand that a lot of people have requested such functionality in
the past, but I'm not sure if anything concrete has ever been
submitted. I'm interested in determining what the general feeling
towards adding such functionality would be and to gain some input with
regards to how this should/could be implemented (assuming the general
concept is acceptable).

Initially we are thinking of providing a device-tree node containing a
"gpio-default" property and would contain a lot of the same properties
as "gpio-hog".

Code wise, it would seem to need to follow roughly the same flow as
gpio-hog, but avoid running "gpiod_request_commit()" so that the GPIO
line could later be requested by user space.

I suspect there's a whole load of details that I'm missing at this
stage and I've not fully thought through the implications for later
removal.

Does something like this seem viable upstream?

Martyn


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

end of thread, other threads:[~2019-06-26 18:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17  8:29 [RFC] Addition of kernel Martyn Welch
2019-06-17  8:38 ` Phil Reid
2019-06-17 11:41 ` Linus Walleij
2019-06-17 12:39 ` Enrico Weigelt, metux IT consult
2019-06-19 11:54   ` Martyn Welch
2019-06-24  8:49     ` Enrico Weigelt, metux IT consult
2019-06-24 21:46     ` Linus Walleij
2019-06-26 18:16       ` Enrico Weigelt, metux IT consult

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).