[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYXfZwBdLSTTPbruD9qynOPuQBOZjCwA_6eE+1MUBCkgA@mail.gmail.com>
Date: Fri, 3 May 2024 09:40:43 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konrad.dybcio@...aro.org>,
Douglas Anderson <dianders@...omium.org>, linux-input@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] dt-bindings: HID: i2c-hid: elan: add
'no-reset-on-power-off' property
Hi Johan,
thanks for your patch!
On Tue, Apr 23, 2024 at 3:46 PM Johan Hovold <johan+linaro@...nel.org> wrote:
> When the power supply is shared with other peripherals the reset line
> can be wired in such a way that it can remain deasserted regardless of
> whether the supply is on or not.
>
> This is important as it can be used to avoid holding the controller in
> reset for extended periods of time when it remains powered, something
> which can lead to increased power consumption. Leaving reset deasserted
> also avoids leaking current through the reset circuitry pull-up
> resistors.
So the reset line in this case is a GPIO as seen from the context above.
To me that means that the line should have the GPIO_OPEN_DRAIN flag
set in the device tree node for reset-gpios. As it has pull-up resistors,
setting the line to high impedance takes the device out of reset, and
thus it is effectively open drain.
> Add a new 'no-reset-on-power-off' devicetree property which can be used
> by the OS to determine when reset needs to be asserted on power down.
If the above holds true, the driver can then just check for the open drain flag
in the reset-gpios phandle, and if that is set, conclude that it should not
actively drive the line low in the poweroff state.
I'd like Krzysztof's input on this though, as he's been all over the reset
code recently and knows it better than me.
Yours,
Linus Walleij
Powered by blists - more mailing lists