Linux I2C development
 help / color / mirror / Atom feed
* [PATCH v7 0/1] i2c: designware: defer probe if child GpioInt controllers are not bound
@ 2026-05-26 10:52 Hardik Prakash
  2026-05-26 10:52 ` [PATCH v7 1/1] " Hardik Prakash
  0 siblings, 1 reply; 3+ messages in thread
From: Hardik Prakash @ 2026-05-26 10:52 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-gpio, wsa, andriy.shevchenko, mario.limonciello, brgl,
	basavaraj.natikar, linusw, Hardik Prakash

Patch 1/2 (pinctrl-amd GPIO IRQ fix) is already in Linus Walleij's
tree, but testing confirms it is not needed with this approach — v7
alone is sufficient. Linus Walleij may wish to drop patch 1.

The root cause: i2c_designware probes AMDI0010:02 before pinctrl-amd
completes. Dynamic debug tracing confirmed the race:

  0.285952  amd_gpio_probe: registering gpiochip  <- GPIO chip visible
  0.287121  amd_gpio_probe: requesting parent IRQ <- probe still running
  0.301454  AMDI0010:02 dw_i2c_plat_probe: start  <- races here
  2.348157  lost arbitration

This patch adds a generic check that walks ACPI child devices, finds
any GpioInt resources, and defers probe if the referenced GPIO
controllers are not yet fully bound. No DMI matching required.

Tested on Lenovo Yoga 7 14AGP11 (83TD), Fedora 44, kernel 7.1.0-rc1+.
Touch and stylus fully functional with v7 alone (without patch 1).

v7:
 - Fix unused 'ret' variable in check_child_gpioint() (kernel test robot)
 - Replace BugLink: with Link: (Bartosz Golaszewski)
 - Add Reported-by and Closes tags for kernel test robot warning

v6:
 - Replace DMI-specific deferral with generic GpioInt dependency check
   walking ACPI child devices (suggested by Mario Limonciello)

v5:
 - Add blank line before #include <linux/acpi.h> (Bartosz Golaszewski)
 - Use scoped_guard(device, gpio_dev) (Bartosz Golaszewski)

v4:
 - Rebase onto Linus Walleij's tree (patch 1 already there)
 - Use --base so series is correctly 1/1 (Andy Shevchenko)

v3:
 - Fix variable declaration style (Andy Shevchenko)
 - Add BugLink tag (Andy Shevchenko)
 - CC AMD engineers (Andy Shevchenko)

v2:
 - Replace custom HID/UID lookup with acpi_dev_get_first_match_dev()
 - Use device_is_bound() under device_lock() with explanatory comments
 - Add Assisted-by tags per coding-assistants.rst

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

Hardik Prakash (1):
  i2c: designware: defer probe if child GpioInt controllers are not
    bound

 drivers/i2c/busses/i2c-designware-platdrv.c | 156 ++++++++++++++++++++
 1 file changed, 156 insertions(+)

base-commit: 3812a9e84265a5cdd90d29fe8d97a023e91fb945

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

end of thread, other threads:[~2026-05-26 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 10:52 [PATCH v7 0/1] i2c: designware: defer probe if child GpioInt controllers are not bound Hardik Prakash
2026-05-26 10:52 ` [PATCH v7 1/1] " Hardik Prakash
2026-05-26 10:56   ` Bartosz Golaszewski

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