Re: [PATCH] gpiolib: TODO: add an item about GPIO safe-state
From: Bartosz Golaszewski
Date: Wed Sep 14 2022 - 11:22:54 EST
On Wed, Sep 14, 2022 at 5:20 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> Hi Bartosz,
>
> On Wed, Sep 14, 2022 at 4:11 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> > This adds a new TODO item for gpiolib and can also be used to start
> > a discussion about the need for it and implementation details.
> >
> > Signed-off-by: Bartosz Golaszewski <brgl@xxxxxxxx>
>
> > --- a/drivers/gpio/TODO
> > +++ b/drivers/gpio/TODO
>
> > +This item is about proposing a solution, most likely in the form of a new device
> > +property called "safe-state" that would define the safe states of specific lines
> > +(e.g. output-high) but not block the line from being requested by users who
> > +could then modify that default state. Once released the GPIO core would then
> > +put the line back into the "safe-state".
>
> #bikeshedding
>
> If this state is the "safe" state, would that imply that any other state is
> "unsafe"? I guess not, as the idea is that a knowledgeable driver can
> still change it (else a hog would be sufficient).
> Hence I think "idle-state" would reflect this better. Any other thoughts?
>
No, you're right, you even mentioned the name "idle-state" during the
BoF session.
Bart