Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix WACF2200 touchscreen on Lenovo Yoga 7 14AGP11
@ 2026-05-13  6:13 Hardik Prakash
  2026-05-13  6:13 ` [PATCH 1/2] pinctrl-amd: enable IRQ for " Hardik Prakash
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Hardik Prakash @ 2026-05-13  6:13 UTC (permalink / raw)
  To: linux-gpio, linux-i2c
  Cc: linus.walleij, wsa, andriy.shevchenko, Hardik Prakash

The Wacom WACF2200 touchscreen on the Lenovo Yoga 7 14AGP11 (83TD) is
completely non-functional on Linux. The I2C bus (AMDI0010:02) fails with
repeated lost arbitration errors at boot before any driver can probe the
device. The touchscreen works correctly in UEFI and Windows.

Investigation using ACPI _CRS decode and Windows/Linux GPIO register
comparison identified two bugs:

1. GPIO 157 (WACF2200 GpioInt per ACPI _CRS) has INTERRUPT_ENABLE and
   INTERRUPT_MASK cleared by amd_gpio_irq_init() and never restored,
   preventing the device from signalling the driver. Windows keeps both
   bits set after initialisation.

2. i2c_designware probes AMDI0010:02 before pinctrl-amd's probe
   completes. A DMI-matched deferral is added to correctly enforce
   ordering using device_is_bound() under device_lock().

Patch 1 adds a DMI quirk in pinctrl-amd to restore GPIO 157 interrupt
bits after amd_gpio_irq_init().

Patch 2 adds a probe deferral in i2c-designware-platdrv that correctly
waits for pinctrl-amd to fully complete before AMDI0010:02 is probed,
using acpi_dev_get_first_match_dev() and acpi_get_first_physical_node()
for robust device lookup.

Both patches tested on Lenovo Yoga 7 14AGP11 (83TD), Fedora 44, kernel
7.1.0-rc2+. Touch and stylus fully functional across 4 stable reboots.

v2:
 - Patch 2: replace custom HID/UID lookup helpers with
   acpi_dev_get_first_match_dev() (Andy Shevchenko)
 - Patch 2: use acpi_get_first_physical_node() to get the platform
   device for correct device_is_bound() check
 - Patch 2: use device_is_bound() under device_lock() with explanatory
   comments (Andy Shevchenko)
 - Patch 2: fix dev_warn to use dev_name() instead of hardcoded suffix
   (Andy Shevchenko)
 - Patch 2: fix commit message (removed incorrect "existing" reference)
 - Both patches: add Assisted-by tags per coding-assistants.rst
 - Patch 1: no functional changes (Acked-by: Andy Shevchenko)

Kernel bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=221494
Related: https://bugzilla.kernel.org/show_bug.cgi?id=221454


 drivers/i2c/busses/i2c-designware-platdrv.c | 75 +++++++++++++++++++++
 drivers/pinctrl/pinctrl-amd.c               | 35 ++++++++++
 2 files changed, 110 insertions(+)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/2] Fix WACF2200 touchscreen on Lenovo Yoga 7 14AGP11
@ 2026-05-12  7:31 Hardik Prakash
  2026-05-12  7:31 ` [PATCH 1/2] pinctrl-amd: enable IRQ for " Hardik Prakash
  0 siblings, 1 reply; 12+ messages in thread
From: Hardik Prakash @ 2026-05-12  7:31 UTC (permalink / raw)
  To: linux-gpio, linux-i2c; +Cc: linus.walleij, wsa, Hardik Prakash

The Wacom WACF2200 touchscreen on the Lenovo Yoga 7 14AGP11 (83TD) is
completely non-functional on Linux. The I2C bus (AMDI0010:02) fails with
repeated lost arbitration errors at boot before any driver can probe the
device. The touchscreen works correctly in UEFI and Windows.

Investigation using ACPI _CRS decode and Windows/Linux GPIO register
comparison identified two bugs:

1. GPIO 157 (WACF2200 GpioInt per ACPI _CRS) has INTERRUPT_ENABLE and
   INTERRUPT_MASK cleared by amd_gpio_irq_init() and never restored,
   preventing the device from signalling the driver. Windows keeps both
   bits set after initialisation.

2. i2c_designware probes AMDI0010:02 before pinctrl-amd's probe
   completes. The existing dw_i2c_amd_gpio_defer_dmi quirk for this
   hardware checks gpio_dev->driver which is set before probe finishes,
   so the deferral does not actually enforce ordering.

Patch 1 adds a DMI quirk in pinctrl-amd to restore GPIO 157 interrupt
bits after amd_gpio_irq_init().

Patch 2 fixes the existing broken deferral in i2c-designware-platdrv to
use device_is_bound() under device_lock(), which correctly waits for
pinctrl-amd probe to complete before AMDI0010:02 is probed.

Both patches tested on Lenovo Yoga 7 14AGP11 (83TD), Fedora 44, kernel
7.1.0-rc2+. Touch and stylus fully functional after applying both patches.

Kernel bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=221494
Related: https://bugzilla.kernel.org/show_bug.cgi?id=221454

Hardik Prakash (2):
  pinctrl-amd: enable IRQ for WACF2200 touchscreen on Lenovo Yoga 7
    14AGP11
  i2c: designware: fix probe ordering for AMD GPIO on Lenovo Yoga 7
    14AGP11

 drivers/i2c/busses/i2c-designware-platdrv.c | 81 +++++++++++++++++++++
 drivers/pinctrl/pinctrl-amd.c               | 35 +++++++++
 2 files changed, 116 insertions(+)

-- 
2.54.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-05-13 17:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13  6:13 [PATCH v2 0/2] Fix WACF2200 touchscreen on Lenovo Yoga 7 14AGP11 Hardik Prakash
2026-05-13  6:13 ` [PATCH 1/2] pinctrl-amd: enable IRQ for " Hardik Prakash
2026-05-13  7:36   ` Linus Walleij
2026-05-13 17:23   ` Mario Limonciello
2026-05-13  6:13 ` [PATCH 2/2] i2c: designware: fix probe ordering for AMD GPIO " Hardik Prakash
2026-05-13 17:12   ` Andy Shevchenko
2026-05-13 17:28     ` Mario Limonciello
2026-05-13 17:03 ` [PATCH v2 0/2] Fix WACF2200 touchscreen " Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2026-05-12  7:31 [PATCH " Hardik Prakash
2026-05-12  7:31 ` [PATCH 1/2] pinctrl-amd: enable IRQ for " Hardik Prakash
2026-05-12  8:47   ` Linus Walleij
2026-05-12 10:46   ` Andy Shevchenko
2026-05-13  7:33   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox