From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (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 63FE146AEDB for ; Thu, 26 Feb 2026 20:24:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772137446; cv=none; b=VWT0eYoUGa4Ib+w+qEeEdtHqpEGtZp0rSn4BiXbd4kmE6Kac6MdC/ir2KZ8O0F8zZQhBccAQ4twIk2Y+1k2wA0qWEHtQIVwv2+LZV/zFLOVVDJfWB0IeDdSaZZdiDAPano4wt+nbDX6vpn176u/mnMCH4jaO80S6H/5qCJkQ15A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772137446; c=relaxed/simple; bh=7cIptIAtCy+YKmfm48wrDxQzATrxEhpTKqY9xKxhVPw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UhhzofSPAsFhfQjJb+pV1pcm2KLGjiXP+LRri2FSELCvsYsAphhntY3OQ51HibJ9iHzoIblEzesN8+846rBDjcuFMM02lu9uzSMEhEkeVZzSPWiCpAKTSVBGBQU2SPKTURP+PhcEEyOayVCSg/f6UJpjPMtIIn2U2DwFr5VVyU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=ArwLD00N; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="ArwLD00N" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=k1; bh=P103 FCGrnxs/xWkEVMA9wfCrrwGUD1RHdk9OgkWjkw4=; b=ArwLD00NgpD8GB6F3smK N81VP79SFKd4S2KXc7kXA8DG2HqiKcVJFAE84wiZkLVbYc0dcDn7xVrrqOstsWmm 7Soa2GzK0V7rlrV345mLTHVvK9YqnQjwG8WTaHRhEhp5Lj26sWW7ILiQSNNSg0Lk 6xVBe+6iePHwSS6IMD4VazRh8aWVu/Jlk7ukQYVSFWIflH3BUhp3GEp+Sxk2fnii ObczMWhgDQeaLFMLAlD8cApZLoPT+tppLZb/0yLahD4PGixDzB3JaKRupzLSPzpI dzo/jA0JGrDU8Ch20uk3ospXBOmwShwf7nY7+Zwqqvg+YlA/gOPAl+aqZgJfkyfm pw== Received: (qmail 1210022 invoked from network); 26 Feb 2026 21:24:01 +0100 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 26 Feb 2026 21:24:01 +0100 X-UD-Smtp-Session: l3s3148p1@u1Kn5r9L+OUujnuU Date: Thu, 26 Feb 2026 21:24:00 +0100 From: Wolfram Sang To: Bartosz Golaszewski Cc: Mukesh Kumar Savaliya , Viken Dadhaniya , Andi Shyti , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Andreas Kemnade , Kevin Hilman , Roger Quadros , Geert Uytterhoeven , Magnus Damm , Patrice Chotard , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Linus Walleij , Frank Li , Bartosz Golaszewski , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org Subject: Re: [PATCH v2 00/12] i2c: configure parent device and OF node through the adapter struct Message-ID: References: <20260223-i2c-adap-dev-config-v2-0-d78db0a6fcf7@oss.qualcomm.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: <20260223-i2c-adap-dev-config-v2-0-d78db0a6fcf7@oss.qualcomm.com> On Mon, Feb 23, 2026 at 10:05:46AM +0100, Bartosz Golaszewski wrote: > It's been another year of discussing the object life-time problems at > conferences. I2C is one of the offenders and its problems are more > complex than those of some other subsystems. It seems the revocable[1] > API may make its way into the kernel this year but even with it in > place, I2C won't be able to use it as there's currently nothing to > *revoke*. The struct device is embedded within the i2c_adapter struct > whose lifetime is tied to the provider device being bound to its driver. > > Fixing this won't be fast and easy but nothing's going to happen if we > don't start chipping away at it. The ultimate goal in order to be able > to use an SRCU-based solution (revocable or otherwise) is to convert the > embedded struct device in struct i2c_adapter into an __rcu pointer that > can be *revoked*. To that end we need to hide all dereferences of > adap->dev in drivers. > > This series addresses the usage of adap->dev in probe() callbacks where > drivers assign the parent device address and the associated OF-node > directly to the struct device embedded in i2c_adapter. We extend the > latter struct to accept the parent struct device and of_node directly > and make it assign it to its internal struct device inside > i2c_register_adapter(). For now just 12 patches but I'll keep on doing it > if these get accepted. Once these get upstream for v6.20/7.0, we'll be > able to also start converting i2c drivers outside of drivers/i2c/. > > Link: https://lore.kernel.org/all/20251106152330.11733-1-tzungbi@kernel.org/ > Signed-off-by: Bartosz Golaszewski Also applied (and squashed) to for-current. Tags are retained BTW.