mbox series

[0/2] Fixes for spurious wakeups on some Lenovo laptops

Message ID 20231203032431.30277-1-mario.limonciello@amd.com
Headers show
Series Fixes for spurious wakeups on some Lenovo laptops | expand

Message

Mario Limonciello Dec. 3, 2023, 3:24 a.m. UTC
Users have reported the inability to properly suspend on
Lenovo Yoga Slim 7 Gen 8 14APU8 and Lenovo YogaAir 14s APU8

Analyzing the problem there are two issues where HID devices connected
over I2C cause spurious wakeup events or high power consumption.

One of the HID devices isn't configured as a wakeup source so the APU
if the interrupt fires over suspend it will wake the APU from a hardware
sleep state but will not return control to the OS.

The second HID device is configured as a wakeup source and continually
fires both at runtime and suspend.

This series mitigates the impact from both of these devices.

Mario Limonciello (2):
  HID: i2c-hid: Add IDEA5002 to i2c_hid_acpi_blacklist[]
  pinctrl: amd: Mask non-wake source pins with interrupt enabled at
    suspend

 drivers/hid/i2c-hid/i2c-hid-acpi.c | 5 +++++
 drivers/pinctrl/pinctrl-amd.c      | 9 +++++++++
 drivers/pinctrl/pinctrl-amd.h      | 5 +++++
 3 files changed, 19 insertions(+)

Comments

Linus Walleij Dec. 4, 2023, 2:46 p.m. UTC | #1
On Sun, Dec 3, 2023 at 4:25 AM Mario Limonciello
<mario.limonciello@amd.com> wrote:

> If a pin isn't marked as a wake source processing any interrupts is
> just going to destroy battery life.  The APU may wake up from a hardware
> sleep state to process the interrupt but not return control to the OS.
>
> Mask interrupt for all non-wake source pins at suspend. They'll be
> re-enabled at resume.
>
> Reported-and-tested-by: Marcus Aram <marcus+oss@oxar.nl>
> Reported-and-tested-by: Mark Herbert <mark.herbert42@gmail.com>
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2812
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

I applied this patch (2/2) to the pin control tree for fixes.

Yours,
Linus Walleij