lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 3 May 2024 10:47:44 +0200
From: Johan Hovold <johan@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Johan Hovold <johan+linaro@...nel.org>, 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

On Fri, May 03, 2024 at 09:40:43AM +0200, Linus Walleij wrote:

> 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.

If you look at the devicetree patch later in the series this is exactly
what is done.
 
> > 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.

That is an alternative I considered but rejected as just knowing that
the gpio is open-drain is not necessarily sufficient, for example, if
the reset line is pulled to always-on rail while power to the device can
be cut.

Perhaps no one would ever construct hardware like that, but it does not
seem like the hardware property I'm trying to encode necessarily follows
from having an open-drain reset line.

And then the OS should probably not make assumptions like that either,
especially since getting it wrong can potentially lead to damaged
hardware.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ