]> www.infradead.org Git - users/hch/dma-mapping.git/commit
HID: i2c-hid: elan: fix reset suspend current leakage
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 7 May 2024 14:48:18 +0000 (16:48 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Fri, 7 Jun 2024 09:18:11 +0000 (11:18 +0200)
commit0eafc58f2194dbd01d4be40f99a697681171995b
tree7b6fe3f15df40d4a0d35738e7012310a0162cf70
parente538d4b85b8f1e3534dfbb42c2273f18bbb59d6e
HID: i2c-hid: elan: fix reset suspend current leakage

The Elan eKTH5015M touch controller found on the Lenovo ThinkPad X13s
shares the VCC33 supply with other peripherals that may remain powered
during suspend (e.g. when enabled as wakeup sources).

The reset line is also wired so that it can be left deasserted when the
supply is off.

This is important as it avoids holding the controller in reset for
extended periods of time when it remains powered, which can lead to
increased power consumption, and also avoids leaking current through the
X13s reset circuitry during suspend (and after driver unbind).

Use the new 'no-reset-on-power-off' devicetree property to determine
when reset needs to be asserted on power down.

Notably this also avoids wasting power on machine variants without a
touchscreen for which the driver would otherwise exit probe with reset
asserted.

Fixes: bd3cba00dcc6 ("HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens")
Cc: <stable@vger.kernel.org> # 6.0
Cc: Douglas Anderson <dianders@chromium.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240507144821.12275-5-johan+linaro@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/i2c-hid/i2c-hid-of-elan.c