Re: [PATCH] gpiolib: TODO: add an item about GPIO safe-state

From: Geert Uytterhoeven
Date: Wed Sep 14 2022 - 11:20:31 EST


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?

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds