From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A615F355F49; Mon, 9 Mar 2026 10:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773052276; cv=none; b=H8ptGMb8X9EKD/OtnvhRFHYRVdJVyvcs1akpv2KWKd4jnlkAhy/wpYocjZmr/R2f8MEYyVVd/GvF/YiO4wcNIfM7eI4kR/EJW4KnLmmAN0YeX7QzppcqhfTNH98qffI86bg+pHRIcMr1WfeECl7+YGOUjdBsf86qHxGZdcieB0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773052276; c=relaxed/simple; bh=1dv+XhP5OwvToCXeXxaL6H6crc5uBccvLhwiXF5Big4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jNim2o9bX0/pd2/5863OmoaNSW16uYNmj7gpxElNmkDQTOVy52USDBzywdGYZDAWYZj5foukyskdmjpQVzu7rrt1gtNXRu5oSfVssMbJnMcPw8QlRn+aCag0CwH1K7qeicODI2UgKCu2EgG1rlbdR6Mnt8kYYGssWEfLVe+buN8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X6j5855B; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X6j5855B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71FDCC4CEF7; Mon, 9 Mar 2026 10:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773052276; bh=1dv+XhP5OwvToCXeXxaL6H6crc5uBccvLhwiXF5Big4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X6j5855B86hH8+1MUUbQdzfRXXIEh36roQzDmNtZdLVlt+VtMSp7FWhuEC7HxLg+4 3ASrEfhKmLdpAm/VP1gGb5GQPHRZyzlA9Wv0XEN1P9t9gflLXWiWM6s0bOGH7yvuC+ bzFzU3sZ14p5clqbm5EJMcExCvTp6B+pn4mlEtyJ/vArl5P4gUHyApQeDYt0UIVnjD fa5DgkOvoLJmWeP1nzIlE2PZbnVc5lUB/zjgDz6l71LVoy9/1JqpjV41i5czOq4RpO WHnzI5JOAaJobCwW4FNmaOORDUiIpodIFsZfZXzTtQ7X18XgT4XUH6FBc26i7cEHtL xVdATdgxh1BHQ== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1vzXtJ-000000006A5-3p2H; Mon, 09 Mar 2026 11:31:13 +0100 Date: Mon, 9 Mar 2026 11:31:13 +0100 From: Johan Hovold To: Bartosz Golaszewski Cc: Wolfram Sang , 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: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Mar 06, 2026 at 06:34:43PM +0100, Bartosz Golaszewski wrote: > On Fri, Mar 6, 2026 at 4:39 PM Johan Hovold wrote: > > You have posted changes that will prevent driver from accessing the > > struct device of core i2c structures. This is unexpected, non-idiomatic > > and subsystem specific and therefore a bad idea. > > That's not true, the changes provide a helper to that end. That was supposed to say "prevent drivers from accessing the struct device *directly*". > > Again, this is a core feature of the driver model. You can't just ignore > > it and come up with random ways to work around just because you disagree > > with design decisions that were made 25 years ago. > > It absolutely *can* be done differently. There's nothing that imposes > a certain API design on susbsystems. If you design the subsystem code > well, provider drivers don't need more than one reference (taken in > probe(), released in remove(), for instance via the > register()/unregister() pair) so the counting can be hidden within the > subsystems that control them. Yes, there is nothing preventing you from diverting from the idiomatic way of doing things. But my point is that that's not a good idea. Johan