All of lore.kernel.org
 help / color / mirror / Atom feed
* libgpiod/dts: way to prevent direction switching and setting initial state of gpio
@ 2021-01-22 15:21 Roosen Henri
  0 siblings, 0 replies; only message in thread
From: Roosen Henri @ 2021-01-22 15:21 UTC (permalink / raw)
  To: linux-gpio; +Cc: bgolaszewski

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

Hi,

I'm using libgpiod to allow gpio functionality to be used from
userspace.

Because of board design, some gpio's should only be used as input.
Driving such gpio's as output might cause undefined behavior or damage
the board.

The proper way to configure such a limitation would be using the kernel
devicetree definition of a gpio. To my knowledge, the kernel dts
currently has no way of preventing this.

Also, functionality is needed to be able to define the initial
direction/state of gpio's, which should be allowed to be changed by
userspace at a later point in time.

To my knowledge, the kernel dts currently has no proper way of
supporting this. There is the "gpio-hog" to define the initial state of
a gpio at boot time, but then cannot be used by libgpiod in userspace,
as the pin is reported to be "in use".

I'm not sure if these two requirements have been discussed in the past,
but in my opinion, in order to properly support gpio's in userspace
from a boards perspective, this functionality is needed.

I'd like an opinion from the maintainers about these requirements and
in case there is no objection we could start a discussion about the
proper way to implement this.

Thanks,
Henri

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3608 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-22 15:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 15:21 libgpiod/dts: way to prevent direction switching and setting initial state of gpio Roosen Henri

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.