From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 99F3C2EEE82; Thu, 16 Jul 2026 18:55:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784228132; cv=none; b=pDbYfKGPdReJkvIVBk/K+s/aD42rM36PDUye7DVV8MOJKdd4HdTmVxw2dRd2zWGcZTH1CtZ0QMN5lnDWnHj2VNjv470Za2KwtiRsZ093MhOgwBQw5XoJyveTNs0zSoO8cyhiXUZ9CI/waC4pb7KZyv0VZLiXh4IXikqLKUzD4d8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784228132; c=relaxed/simple; bh=S3XoxovJHW+4hU4Q6K5pChqd6sCN1PXzVgrO2etPW2k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CPI1n316p0UaZzDo6cDpcd2WyjoZvraCHkVbaPDlgT1z7BVJYwvfO2OUzVcSXiTC62L8AoWDq0pbKLdO68p3yeqge3stXsXAPK/wnJJ7CgHaJSNSyZe57lhQdHhKo8w7QC9693+Lmv7uRfVQalD1+or7NX5tYDHTSfBxA7PHnhQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dCwGY39u; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dCwGY39u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784228131; x=1815764131; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=S3XoxovJHW+4hU4Q6K5pChqd6sCN1PXzVgrO2etPW2k=; b=dCwGY39uwhYsji4/6NZO1fiMnZIYs9VBs4rDSJUVljf3pxh39oAPR7NM fHND2SlxS7YbGQvthS312NdVpbADBKJJ8c92gnf6abpFywdsUvHo1RKMI wuMrxA3EJXsEiRSe4UgDUsQiUPvzxA4b/bnURrkzPw9JtxZ8IF8wUOe1k Is2ceoiRF5vkio4AFoyQGyRIwI0oeQHvFCdTaiIraVau57rOmV3wO5fyh +6vJiCTykYlxe6ujwLXo6qwT+g6/39tuntqSPzexaccZfP86gqRfttU+j Zyw+PV5/k3zQWTfCnOXarq1qxKaOJgOrv9vurVAQhFigaVKiX5rLjUrKx A==; X-CSE-ConnectionGUID: 5TjLAV2TQ56oo6HCEndR7w== X-CSE-MsgGUID: As8V1lpPRfWLWKoj2ubDFQ== X-IronPort-AV: E=McAfee;i="6800,10657,11848"; a="83885595" X-IronPort-AV: E=Sophos;i="6.25,167,1779174000"; d="scan'208";a="83885595" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2026 11:55:30 -0700 X-CSE-ConnectionGUID: XGwzo1BtS9O/1By4tvuvQA== X-CSE-MsgGUID: 8ido/z2nSk6y7sH9TXzZIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,167,1779174000"; d="scan'208";a="258567750" Received: from conormcd-mobl2.ger.corp.intel.com (HELO localhost) ([10.245.245.26]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2026 11:55:27 -0700 Date: Thu, 16 Jul 2026 21:55:25 +0300 From: Andy Shevchenko To: Hardik Prakash Cc: linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, wsa@kernel.org, mario.limonciello@amd.com, brgl@bgdev.pl, basavaraj.natikar@amd.com, linusw@kernel.org, nathan@kernel.org, chaitanya.kumar.borah@intel.com Subject: Re: [PATCH v12] i2c: designware: defer probe if child GpioInt controllers are not bound Message-ID: References: <20260716113055.41319-1-hardikprakash.official@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260716113055.41319-1-hardikprakash.official@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Thu, Jul 16, 2026 at 05:00:55PM +0530, Hardik Prakash wrote: > I2C controllers may have child devices with GpioInt resources that > depend on GPIO controllers being fully initialized. If the I2C > controller probes and enumerates children before the referenced GPIO > controller has completed probe, GPIO interrupts may not be properly > configured, leading to device failures. > > On Lenovo Yoga 7 14AGP11, the WACF2200 touchscreen (child of > AMDI0010:02) has a GpioInt resource pointing to GPIO 157 on the > pinctrl-amd controller (AMDI0030:00). When i2c-designware probes > AMDI0010:02 before pinctrl-amd finishes initializing, I2C transactions > fail with lost arbitration errors: > > 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 > > Add a dependency check that walks ACPI child devices and defers probe > until any referenced GPIO controller is bound. It's utterly wrong patch. Actually this whole saga shows how AI wastes more time than gains a productivity. ... > gpio_dev = gpio_device_to_device(gdev)->parent; > - scoped_guard(device, gpio_dev) { > - if (!device_is_bound(gpio_dev)) > - return -EPROBE_DEFER; /* controller not bound yet: abort walk */ > - } > + guard(device)(gpio_dev); When use guard()(), make sure it has a blank lines before and after, so it's visible as a separate entity. > + if (!device_is_bound(gpio_dev)) > + return -EPROBE_DEFER; /* controller not bound yet: abort walk */ > ... So, make sure v13 is a real patch. -- With Best Regards, Andy Shevchenko