Re: [PATCH 3/6] dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property

Linus Walleij
2024-05-06T06:29:52Z

On Fri, May 3, 2024 at 10:47 AM Johan Hovold <johan@kernel.org> wrote:

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

OK it's a fair point.

I was worried about over-specification of behaviour, as that always
leads to contradictions.

+ no-reset-on-power-off:
+ type: boolean
+ description:
+ Reset line is wired so that it can be left deasserted when the power
+ supply is off.

To be nitpicky: *should* be left deasserted rather than *can* be left
deasserted, right? If the behaviour is desirable but not strictly
required.

Yours,
Linus Walleij