"Exclusive" resources that are not exclusive - the case of shared GPIOs in...
summary
Device-tree often lists the same GPIO for multiple devices but the GPIO API treats a line as exclusive; current workaround uses a non‑exclusive flag that lets drivers “fight” with no sync. A working solution is reset-gpio: create a dynamic auxiliary reset device that requests the GPIO once and exposes reset controls via the reset core. The new approach creates GPIO shared proxy devices at boot that vote-to-enable lines, let the first user set direction, prevent later direction changes, count references for driven-high semantics, and allow per-user options like active_low.
AI-written summary · about
chapters (6)
- 0:00Introduction and motivation
- 1:53Reset GPIO solution
- 4:01Shared GPIO challenges
- 5:50GPIO shared proxy design
- 7:37Pin control interaction
- 10:05Q&A on shared GPIOs
related talks
16mSharing Reset GPIOs in the Linux Kernel
51mGPIO for Engineers and Makers
19mPinctrl and GPIO - Interactions and Footguns
19mPinctrl and GPIO - Interactions and Footguns
48mPin Control and GPIO Update
44mNew GPIO Interface for User Space
23mGive Me Back My GPIO Persistence Intro to the libgpiod GPIOManager
53mImproving resource ownership and life-time in linux device drivers
