Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Hardik Prakash <hardikprakash.official@gmail.com>,
	linux-i2c@vger.kernel.org
Cc: linux-gpio@vger.kernel.org, wsa@kernel.org,
	andriy.shevchenko@intel.com, brgl@bgdev.pl,
	basavaraj.natikar@amd.com, linus.walleij@linaro.org
Subject: Re: [PATCH v3 0/1] i2c: designware: fix probe ordering for AMD GPIO on Lenovo Yoga 7 14AGP11
Date: Fri, 15 May 2026 12:34:20 -0500	[thread overview]
Message-ID: <32e96be9-a987-4847-b02d-d288f3fbeeb2@amd.com> (raw)
In-Reply-To: <20260515161516.10474-1-hardikprakash.official@gmail.com>



On 5/15/26 11:15, Hardik Prakash wrote:
> The Wacom WACF2200 touchscreen on the Lenovo Yoga 7 14AGP11 (83TD) is
> non-functional on Linux due to two bugs. Patch 1 (pinctrl-amd GPIO IRQ
> fix) has already been taken into Linus Walleij's tree. This v3 resend
> covers patch 2 only, addressing Andy Shevchenko's formatting feedback.
> 
> Root cause: i2c_designware probes AMDI0010:02 before pinctrl-amd's
> probe completes, so GPIO 157 (WACF2200 GpioInt per ACPI _CRS) has its
> interrupt bits cleared when the first I2C transaction is attempted,
> causing lost arbitration errors. The udev rebind workaround (which
> works because pinctrl-amd has finished by userspace time) confirms
> probe ordering as the root cause.
> 
> Note: the dual-master hypothesis raised by Mario Limonciello was
> investigated. TPNL's _DSM (UUID 3cdff6f7-4267-4555-ad05-b30a3d8938de)
> is a pure query method returning a constant HID descriptor address with
> no side effects, making firmware acting as secondary I2C master unlikely
> on this hardware. Awaiting Mario and Bart's technical verdict before
> any further approach changes.
> 
> v3:
>   - Patch 2 only (patch 1 already in Linus Walleij's tree)
>   - Fix variable declaration style in dw_i2c_needs_amd_gpio_dep (Andy Shevchenko)
>   - Add BugLink tag (Andy Shevchenko)
>   - Add -v3 subject versioning (Andy Shevchenko)
>   - CC AMD engineers (Andy Shevchenko)
> 
> v2:
>   - Replace custom HID/UID lookup with acpi_dev_get_first_match_dev() (Andy Shevchenko)
>   - Use acpi_get_first_physical_node() for platform device lookup
>   - Use device_is_bound() under device_lock() with explanatory comments
>   - Fix dev_warn to use dev_name() instead of hardcoded suffix
>   - Fix commit message (removed incorrect "existing" reference)
>   - 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: fix probe ordering for AMD GPIO on Lenovo Yoga 7
>      14AGP11
> 
>   drivers/i2c/busses/i2c-designware-platdrv.c | 77 +++++++++++++++++++++
>   1 file changed, 77 insertions(+)

I have another idea.  Why don't we just move pinctrl-amd to initialize 
earlier?  That should avoid the problem without more quirks I think.

Something like this:

╰─❯ git diff
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index e3128b0045d22..56a189082351b 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -1292,7 +1292,18 @@ static struct platform_driver amd_gpio_driver = {
         .remove         = amd_gpio_remove,
  };

-module_platform_driver(amd_gpio_driver);
+static int __init amd_gpio_init(void)
+{
+       return platform_driver_register(&amd_gpio_driver);
+}
+subsys_initcall(amd_gpio_init);
+
+static void __exit amd_gpio_exit(void)
+{
+       platform_driver_unregister(&amd_gpio_driver);
+}
+module_exit(amd_gpio_exit);

  MODULE_AUTHOR("Ken Xue <Ken.Xue@amd.com>, Jeff Wu <Jeff.Wu@amd.com>");
  MODULE_DESCRIPTION("AMD GPIO pinctrl driver");
+MODULE_LICENSE("GPL");


      parent reply	other threads:[~2026-05-15 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 16:15 [PATCH v3 0/1] i2c: designware: fix probe ordering for AMD GPIO on Lenovo Yoga 7 14AGP11 Hardik Prakash
2026-05-15 16:15 ` [PATCH v3 2/2] " Hardik Prakash
2026-05-15 17:34 ` Mario Limonciello [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32e96be9-a987-4847-b02d-d288f3fbeeb2@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=basavaraj.natikar@amd.com \
    --cc=brgl@bgdev.pl \
    --cc=hardikprakash.official@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox