Thread (25 messages) 25 messages, 7 authors, 2019-11-18

Re: [RFC v2 0/2] gpio: Support for shared GPIO lines on boards

From: Rob Herring <robh+dt@kernel.org>
Date: 2019-10-30 18:49:44
Also in: linux-gpio, lkml

On Wed, Oct 30, 2019 at 9:30 AM Peter Ujfalusi [off-list ref] wrote:


On 30/10/2019 16.17, Mark Brown wrote:
quoted
On Wed, Oct 30, 2019 at 03:32:09PM +0200, Peter Ujfalusi wrote:
quoted
On 30/10/2019 15.12, Rob Herring wrote:
quoted
quoted
Why can't we just add a shared flag like we have for interrupts?
Effectively, we have that for resets too, it's just hardcoded in the
the drivers.
quoted
This would be kind of the same thing what the
GPIOD_FLAGS_BIT_NONEXCLUSIVE does, which was a quick workaround for
fixed-regulators afaik.
The theory with that was that any usage of this would need the
higher level code using the GPIO to cooperate so they didn't step
on each other's toes so the GPIO code should just punt to it.
But from the client driver point of view a GPIO is still GPIO and if the
components are unrelated then it is hard to patch things together from
the top.
You can't escape a driver being aware. If a driver depends on that
GPIO to actually be set to states the driver says, then it can't be
guaranteed to work. For example, maybe the driver assumes the device
is in reset state after toggling reset and doesn't work if not in
reset state. The driver has to be aware no matter what you do in DT.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help