libgpiod/dts: way to prevent direction switching and setting initial state of gpio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux