Thread (22 messages) 22 messages, 3 authors, 2017-10-31

[RFC PATCH 1/5] gpio: gpiolib: Add core support for maintaining GPIO values on reset

From: Linus Walleij <hidden>
Date: 2017-10-20 07:43:33
Also in: linux-devicetree, linux-gpio, lkml, openbmc

On Fri, Oct 20, 2017 at 9:17 AM, Linus Walleij [off-list ref] wrote:
On Fri, Oct 20, 2017 at 5:37 AM, Andrew Jeffery [off-list ref] wrote:
quoted
GPIO state reset tolerance is implemented in gpiolib through the
addition of a new pinconf parameter. With that, some renaming of helpers
is done to clarify the scope of the already existing
gpiochip_line_is_persistent(), as it's now ambiguous as to whether that
means on suspend, reset or both.
Isn't it most reasonable to say persistance covers both cases, reset
and/or sleep? This seems a bit like overdefined.
I should also add: right now persistance is defined in negative terms,
you can supply the flag "may lose value", which means the subsystem
by default, and driver by default, will try to keep values persistent across
sleep.

Then it is possible to opt in for not doing so. (Usually to save power I
think.)

I think that especially for userspace use cases, saving power should
not really be the concern, but correct me if I'm wrong. I am thinking
of a box with a DC plug wired up to a factory line here.

What we have in the Arizona driver is an opt-in where the DT can
say "don't preserve the value  this line during system sleep" i.e. "lay lose
value" and we can extend that flag to mean "don't preserve this line
during reset either" but by default assume that we should.

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