From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazon11010020.outbound.protection.outlook.com [40.93.198.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D016387578; Sat, 23 May 2026 12:43:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.198.20 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779540202; cv=fail; b=sHjKwgAg2ayTRiwti7bv7iKzFNTcmIkEbFcN+Les/hv9zCB+CGSm9BK3ZRv3sp8IPkAkJ2EVYx+Qg9hPXG4Srk6CZHBWYwOQGPXQ5erF+oqEKJYYM9vVOR2b1LZXHPpakUuxQUgbv6AWQeXsamLKTlnhtKCVJSg/rSCi4DRBlEM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779540202; c=relaxed/simple; bh=UDxw7irPovsyUYijLfkbU+cGiXw/2qjKb15yYLB8Pek=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=Qjuq2H3foKFPDouu2LCrlG1BD59hkSo/wXRkeMHyKVVH0SzQCE/Hp+AbTlclw5aqkHMbEGJL2N9NQ9EZ8SFVs96G4tMaBrF7qiqkt+2AoU/vY8VPb5bPZjqFf040cUCfXu5NfDcVR6SyAoxssJbMPIwwEytehliMxQ84aA/gaPI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=KAsckSbR; arc=fail smtp.client-ip=40.93.198.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="KAsckSbR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eqL4cLX8UK/xIlHHC9HwPm15tXCIPlLUhu4r0ZFmWEQ8VPsVEoZTP9rowUnh4AKcX1Kc3wF7CwkNgqaGdefL6PnO8fq4R3raUxPlOlsHb8I46T+JMMkOOWsLZrDMm22xjijmHfW5agsA16XJGs81wRw2hcBe2qRtoxOXvI4nl0xLXszEhW3ohnTg1dZb+LIRaNaoUx2v+leRnsStb/upOh+cd6oRl2YN2c1CrIBTnGixTR4J9mNBsZsNLbNw/k14qzHM2Y05G7tq9NPKkuRnj3f5ulFSLoy9UcIXPmO49m4qatpN0kAxT8rQjKiRy1qEPpzOm6jw6mZbiRyKk5oDfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+rbnlfmuSFOGr8OGnZm7NgJ60pxBMXDuXT71znzPI6g=; b=ZOJICib5c8EhkKIhddyG1P83o7ZbBu52q1muWWB4YhzuyxAAniqaiK7uwFHkmzrDHRDT64G4s4KVnYY9J6dEHJ779yQsKCroalXK4cv87DfxeMgvNLlueISjqnli0F2yP+Pc+1S94HPygGAwpulJ7jHD+Wz/JDvkeuu4hm73zPC7IUC/W/5x8dDB4d8Fxy9NfmIfsmVbxp8H+l71wmrP1BCMyTnww+x0T4QYgjh6REw3qHVvvontr9YRssD2nRw4qFvWtuGdHMdthAuw7/rUS5/KA9YUKU87ud6EjaeOfe/6/l6yhMODZyqSA1+ii9pL909X3g33zQIMh7GiFifK+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+rbnlfmuSFOGr8OGnZm7NgJ60pxBMXDuXT71znzPI6g=; b=KAsckSbRgFVntwbXPtTGiyPspgU9dy4b8G/YL4jB7mNvx5pnXxRhn8gwYqO0oBdPdlc8OksEC30YAgDVUAAWObJrX+VKLw6Agme4SBwKM5g3MIhcG18L2W/2RZ/3xE5z26YJTjITKl0GFTiqXcIXc+FU8GVfVvQV1xdAmW63+O8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH8PR12MB6914.namprd12.prod.outlook.com (2603:10b6:510:1cb::21) by BL4PR12MB9534.namprd12.prod.outlook.com (2603:10b6:208:58f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.18; Sat, 23 May 2026 12:43:16 +0000 Received: from PH8PR12MB6914.namprd12.prod.outlook.com ([fe80::2893:177a:72b0:6000]) by PH8PR12MB6914.namprd12.prod.outlook.com ([fe80::2893:177a:72b0:6000%6]) with mapi id 15.21.0048.016; Sat, 23 May 2026 12:43:16 +0000 Message-ID: <1fe21869-35ac-4363-99bc-7e39451c48b4@amd.com> Date: Sat, 23 May 2026 07:43:14 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/1] i2c: designware: fix probe ordering for AMD GPIO on Lenovo Yoga 7 14AGP11 To: Hardik Prakash Cc: Bartosz Golaszewski , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, wsa@kernel.org, basavaraj.natikar@amd.com, linus.walleij@linaro.org References: <20260518122814.8975-1-hardikprakash.official@gmail.com> <9d5da93e-bbe0-4359-9f17-e3c6b3a5cb34@amd.com> <498bad3f-6a0c-4da8-b645-1cc837ba1836@amd.com> Content-Language: en-US From: Mario Limonciello In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA1P222CA0072.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2c1::28) To PH8PR12MB6914.namprd12.prod.outlook.com (2603:10b6:510:1cb::21) Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR12MB6914:EE_|BL4PR12MB9534:EE_ X-MS-Office365-Filtering-Correlation-Id: dbd86942-5238-499a-f345-08deb8c8dc66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|22082099003|56012099003|18002099003|4143699003|6133799003|11063799006|5023799004; X-Microsoft-Antispam-Message-Info: 27qhq8Jl0Lzu6KyRQ1m+hc0rhd7r5rex8zyK5IbOXBuk6U0Gwj2DzCEzWbztG4NLmQMOnRl/6UWOYzdKPJnoMZ8ERaFx0YMIXfWmzwY4T9L+XpUbeh/MtMuW9UcRcSaa9gFPHEcQWN2jQyoUG/XWN9roYQty4aogAmsCoaDB1G+a4AqjuWMMsq0AtIjWCMKCdFQ8TEGZC6X2ELj7FRqtwPuuw2fBz/TIec+3WWunbKiuKaQs6MvuQ7MLq4FjKWQ7eGp9t27ap5/V6nUe0erO4CO+CBaMSL90tUIwx6iesVLebnrN2Hpqmm/M90L4myLzQ5Itn4rxxd637PJK4Aab0QGefjLlCv/hkWagF7mvEMbYdt2/Gcz1WY60o0fbe0ix6SBMlO4JiM95PY/Mh4ZDwgt+Qrxa6SpBIjPIf4GOPRKhaWbZGofWhbSJYSYGq2jK8Qjmx06ux+ZiYCXHjoK5HlJF6ZxDr/pvOAYi2WTlA5WN6DD6AuoeRIxuF5HQ5qVNYMEEX27fdGidMVOWLP7/sf4Jg1CpLtg/AdVG/gRWIqHwJk4xxQyaUQ8DpC/dkR3Q+E8+UY13zzGShXvNzSi7vLyPx4krw4qKwft7Drgx9XkNqxUMxZOJFHxYBi5QX3vTwPNFG+e8x1GC7yWOWPEb3jIyfui9DQ82LB3W4vUx1n30eQN2PdakKKw50LrHS6GR X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR12MB6914.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(22082099003)(56012099003)(18002099003)(4143699003)(6133799003)(11063799006)(5023799004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eVdkajhrWWxreEVuVGgwOGIzdUtyMDBFcnd4Z3FDNDhYN3dOVVNLZy9aR3hi?= =?utf-8?B?NVJKVTVaVjVvMEptYXo1ckFzdFFSZHB5bTZUcEpaWTBybEZHcUpJOWFabHdZ?= =?utf-8?B?RnJON3lHcXJnQUg2MzFKMllmWWt5aDFkV0lJK2N0UGwvdmJyVW5EZlR3ZzNW?= =?utf-8?B?cm9LWDBuUTZFN0VhWEphZlh6aWxMZnFLNVNkWGV1RDQ1L1FtRzl1NkU3WURS?= =?utf-8?B?cWluRWVrN0Jkblh1dlhkdkV1cTVnZTYyMXo0V2cvaHFRajhhUWZRMHAyTWRJ?= =?utf-8?B?Wm1lenZtcGEydHZNaUdyK2VuaUJ0bHEySnNGc29Hb3hjUXJncWpzL2tpS2Qv?= =?utf-8?B?RHNncUlTaTBaOXhZMnZaVXVYeXgwZndRUnhYWnlEN0dGa3g2UE15SGd1UWNY?= =?utf-8?B?N3krWDZ1ck01U2xVUUMwTkxueVdESHc0VWpCWWFkU0lna0dUYzNnZXIxS2xE?= =?utf-8?B?cGlFWEo4NUJrRStoVStOK0lvM2ZFaDlqNWY3ZS9BOEYrc2ppajlGdm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wNTBtO?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbd86942-5238-499a-f345-08deb8c8dc66 X-MS-Exchange-CrossTenant-AuthSource: PH8PR12MB6914.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2026 12:43:16.5906 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A++u6xtUP02MG96Cx7cctVy+bI8XSrBcLHOLma4d6cNgwibuF0Sm296KATXWxHJb0SqI/NzA3i30/gCM1TD5RA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL4PR12MB9534 On 5/23/26 02:51, Hardik Prakash wrote: > On Tue, May 19, 2026 at 02:23, Mario Limonciello wrote: >> In the same line of thinking - how about something like this instead >> (AI generated and attached). > > I've cleaned up your patch (fixed kzalloc_obj, moved goto outside > scoped_guard, wrote a proper commit message) and am planning to submit > it as v6 with Co-developed-by and Signed-off-by carrying your name. > > Please let me know if you're happy with that, or if you'd prefer to > submit it yourself. It was 100% written by the robot, just shared by me for a reference. I don't think it needs a S-o-b, you can leave a Suggested by for me at most. Go ahead and drive it forward for discussion. > > Thanks, > Hardik > > On Wed, 20 May 2026 at 10:32, Hardik Prakash > wrote: >> >> On Tue, May 19, 2026 at 02:23, Mario Limonciello wrote: >>> In the same line of thinking - how about something like this instead >>> (AI generated and attached). >>> >>> Basically walk through the resources at probe time and make sure they're >>> all bound. >> >> Tested. Works perfectly — clean boot, no arbitration errors, touchscreen >> and stylus fully functional: >> >> patch 1 + generic GPIO dependency check: clean boot, touchscreen works >> >> The generic approach is better. With this patch, patch 2 (the >> DMI-specific i2c-designware deferral) is no longer needed. >> >> Note: I applied kzalloc(sizeof(*ref), GFP_KERNEL) in place of >> kzalloc_obj(*ref, GFP_KERNEL), and moved the goto outside the >> scoped_guard using a local bool. Happy to share the exact diff I tested >> if useful. >> >> Thanks, >> Hardik >> >> On Wed, 20 May 2026 at 02:23, Mario Limonciello >> wrote: >>> >>> >>> >>> On 5/19/26 14:49, Hardik Prakash wrote: >>>> On Tue, May 19, 2026 at 20:18, Mario Limonciello wrote: >>>>> I like this idea. I guess something like this: >>>>> [gpiolib-acpi-core.c patch] >>>> >>>> Tested patch 1 + gpiolib-acpi deferral, without patch 2. Arbitration >>>> errors persist: >>>> >>>> patch 1 + gpiolib-acpi deferral: arbitration errors, WACF2200 does not probe >>>> patch 1 + patch 2 (v5): clean boot, touchscreen fully functional >>>> >>>> I think the reason is that i2c-designware does not call acpi_get_gpiod() >>>> during its probe. The GpioInt resource is on the WACF2200 touchscreen >>>> device (TPNL), not on the I2C controller itself. So the deferral in >>>> acpi_get_gpiod() never triggers for AMDI0010:02 -- nothing in that probe >>>> path requests a GPIO descriptor. >>>> >>>> The race is between amd_gpio_probe() completing and dw_i2c_plat_probe() >>>> starting for AMDI0010:02. Without something that explicitly checks >>>> whether the GPIO controller is fully bound before the I2C controller >>>> probes, the race remains. >>>> >>> >>> In the same linke of thinking - how about something like this instead >>> (AI generated and attached). >>> >>> Basically walk through the resources at probe time and make sure they're >>> all bound. >>> >>>> Thanks, >>>> Hardik >>>> >>>> On Wed, 20 May 2026 at 00:37, Hardik Prakash >>>> wrote: >>>>> >>>>> On Tue, May 19, 2026 at 19:58, Mario Limonciello wrote: >>>>>> You add a debug statement to amd_gpio_irq_enable() too right? Can you >>>>>> please share your debugging messages patch and full log? >>>>> >>>>> I did not add debug to amd_gpio_irq_enable() - the statements were >>>>> only in amd_gpio_probe() and dw_i2c_plat_probe(). I can add one there >>>>> if useful, but given Bart's suggestion below I'll hold off unless >>>>> needed. >>>>> >>>>>> What is the boot time impact to adding device_is_bound() check? >>>>> >>>>> I haven't measured this explicitly. The deferral only fires on DMI- >>>>> matched hardware (Lenovo 83TD), so on other machines dw_i2c_defer_for_ >>>>> amd_gpio() returns 0 immediately with no overhead. >>>>> >>>>> On Tue, May 19, 2026 at 20:18, Mario Limonciello wrote: >>>>>> I like this idea. >>>>> >>>>> I'll test this patch, and let you know how it goes. >>>>> >>>>> Thanks, >>>>> Hardik >>>>> >>>>> On Tue, 19 May 2026 at 20:18, Mario Limonciello >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> On 5/19/26 09:39, Bartosz Golaszewski wrote: >>>>>>> On Tue, May 19, 2026 at 4:28 PM Mario Limonciello >>>>>>> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> gpiochip_add_data() at 0.285952 makes the GPIO chip visible to the >>>>>>>>> system before amd_gpio_probe() has finished. AMDI0010:02 starts probing >>>>>>>>> at 0.301454 while amd_gpio_probe() is still completing. This is why >>>>>>>>> device_is_bound() works and initcall promotion does not -- it waits for >>>>>>>>> probe completion, not just gpiochip registration. >>>>>>>> >>>>>>>> What is the boot time impact to adding device_is_bound() check? >>>>>>>> >>>>>>>> Bartosz, thoughts? >>>>>>>> >>>>>>> >>>>>>> My thoughts are that ACPI could use some fw_devlink. :) It's not a new >>>>>>> problem, we've fixed it for OF systems. >>>>>>> >>>>>>> Could we modify gpiolib-acpi.c to return -EPROBE_DEFER if the parent >>>>>>> device of the GPIO chip is not bound yet instead? When resolving the >>>>>>> reference to the remote GPIO controller we have an address of the >>>>>>> struct acpi_device. I suppose there's a platform device that is its >>>>>>> child and then the logical GPIO controller device, is that correct? >>>>>>> Can we check if the platform device in question is bound at the >>>>>>> subsystem level? >>>>>>> >>>>>>> Bart >>>>>> >>>>>> I like this idea. I guess something like this: >>>>>> >>>>>> diff --git a/drivers/gpio/gpiolib-acpi-core.c >>>>>> b/drivers/gpio/gpiolib-acpi-core.c >>>>>> index eb8a40cfb7a98..e3511398b1f84 100644 >>>>>> --- a/drivers/gpio/gpiolib-acpi-core.c >>>>>> +++ b/drivers/gpio/gpiolib-acpi-core.c >>>>>> @@ -142,6 +142,13 @@ static struct gpio_desc *acpi_get_gpiod(char *path, >>>>>> unsigned int pin) >>>>>> if (!gdev) >>>>>> return ERR_PTR(-EPROBE_DEFER); >>>>>> >>>>>> + if (gdev->dev.parent) { >>>>>> + scoped_guard(device, gdev->dev.parent) { >>>>>> + if (!device_is_bound(gdev->dev.parent)) >>>>>> + return ERR_PTR(-EPROBE_DEFER); >>>>>> + } >>>>>> + } >>>>>> + >>>>>> /* >>>>>> * FIXME: keep track of the reference to the GPIO device somehow >>>>>> * instead of putting it here. >>>>>>