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 1F9803976A7 for ; Wed, 4 Mar 2026 11:07:42 +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=1772622464; cv=none; b=myYJiM5ZikXTSlUzEEN+/LXxeevg3/pWz5oiW9ib841Cn1guSkYs57wTpPVTesyGdwXfajtUNMw4SbWe9xEwEZoqVsKjBBJdU3hdPksZSdMAdpkgJzj0nUBvQ6JfjOzL4z4dNrVvjjLnNEBsCy4tGxkXYi6pODFB9vEsDFiNLnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772622464; c=relaxed/simple; bh=GQgZl+hb5vJHSc5otdcv/INSX/iqwoYHQ/QyhJiHEOY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p25oX4lkU0CDdcWusk982NHwNPM8EijUcKXvg6MlH050+Ht48XYWFO0JW1pF3weWwgE+heBDlNMDULd0tfYlxCHqGltiGYiZrxLhkKqVtSa4WyrtkTyqg46NRIGiyQh2JRAqttTbhZq7LPvE8o1yDLkCQu6OhIdvFxKL2PBG2Kg= 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=kkivlZzP; 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="kkivlZzP" 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=Go6W ehmyci0DJ/MCAqPt3GYrNoZxkU13L6zOAdfar8s=; b=kkivlZzPtMJBXQH/hPQ3 qPCcLeyBPW7V9igmfr58nDc4NCvyUwzGdvAK/tIsS18FsNK2UOl2llVTiRyIQDH8 zX64j6IFxhKiwPtP0mCvWQDqKyem0mxivks65IsLnnGgzejW/UbORNu6fVqegwke soPJOCFJ7fO6ci9/sJyDjtt088/mH1PBt4uWsN00gJaSRvz9Au+P3PzXZXC69AQP o8aYQwbaVu/COFNWlQy6UP9/ZIekJc+opAnXSKLR7fisH2iL1s29I5lgFHiz/p98 hoBGmoA0+RlVDSglIYUHHdWMlv+mJvwKcdfR4PVQ3LULl54pUz5Sc+EoC7/JEe0n tw== Received: (qmail 702506 invoked from network); 4 Mar 2026 12:07:40 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Mar 2026 12:07:40 +0100 X-UD-Smtp-Session: l3s3148p1@BIQK1DBMcBptKXG7 Date: Wed, 4 Mar 2026 12:07:39 +0100 From: Wolfram Sang To: Bartosz Golaszewski Cc: Johan Hovold , Bartosz Golaszewski , Andi Shyti , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Khalil Blaiech , Asmaa Mnebhi , Jean Delvare , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Andreas =?utf-8?Q?F=C3=A4rber?= , Manivannan Sadhasivam , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-actions@lists.infradead.org, linux-media@vger.kernel.org Subject: Re: [PATCH v2 00/13] i2c: add and start using i2c_adapter-specific printk helpers Message-ID: References: <20260223-i2c-printk-helpers-v2-0-13b2a97762af@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@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: Hi Bart, hi Johan, > And I agree: doing the above would be even better but you'd need - for every > driver - to move the i2c_adapter struct out of driver data and make it a > pointer. That's in addition to providing new APIs and using them. I2C drivers > are spread treewide. There's a reason why nobody attempted it for decades. I'm > proposing something a bit less complex: allow drivers to free i2c_adapter at > unbind but make i2c core keep a private, reference-counted structure for as > long as it's needed. I am still with Bart, the above paragraph sums it up extremly well IMO. I also recall that the outcome of the Plumbers session 2024 was "go for it!". Nobody said the approach would be "fighting" the driver model. There were a lot of experienced developers in the room. > I'm frustrated because I'm spending time working on an actual solution. I've > explained what I'm doing and what the end result will look like based on what > works for GPIO (struct gpio_chip's lifetime is bound to device's "bound" state, > struct gpio_device is refcounted, I want to mirror it with i2c_adapter and > whatever we eventually call its refcounted counterpart - let's say: > i2c_bus_device). I am super-happy and thankful that Bart volunteers to spend all this time on fixing this decade old problem. I know this alone is not a reason to accept a technically bad solution. But I think it isn't. I think it is a viable approach to keep the churn and potential regressions lower than a theoretically ideal solution which is nobody to do anyways because you'd need to refactor drivers from the 90s in a quite intrusive way. All the best, Wolfram