On Fri, Oct 24, 2025 at 9:17 AM Péter Ujfalusi
[off-list ref] wrote:
On 22/10/2025 16:10, Bartosz Golaszewski wrote:
quoted
Problem statement: GPIOs are implemented as a strictly exclusive
resource in the kernel but there are lots of platforms on which single
pin is shared by multiple devices which don't communicate so need some
way of properly sharing access to a GPIO. What we have now is the
GPIOD_FLAGS_BIT_NONEXCLUSIVE flag which was introduced as a hack and
doesn't do any locking or arbitration of access - it literally just hand
the same GPIO descriptor to all interested users.
I had few stabs on this in the past, all got somehow derailed, one
example was:
https://lkml.org/lkml/2019/10/30/311
The main issue I see with this approach is adding an actual device
node for the shared GPIO which is now not accepted in DT bindings. We
only create nodes for actual HW components. All the information is
already in the device-tree, we just need to scan it which is what I'm
trying to do here.
Bartosz