From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (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 6D61732D45C for ; Mon, 26 Jan 2026 10:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.67.36.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769422503; cv=none; b=rM9oYFu6KvdASUzoCg6Vq1ZNJ1PJozGFQgPzZ5jGXnY/V76IWolk/UaVt/IitgFRhjO1sRqmHSYxXgRUVrLgMODr7c/R/D0cZCNc3GEoSjbviN4BwrHGu+YOWFfhhquixjgM1+M7TgpIWxICaUJIZlcme+46MBE+Kxvuch9D3JU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769422503; c=relaxed/simple; bh=Rwl08LlMK5tYxXpdB6OUAqXrc88pfu1wm02Z38tXUrE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ekDfPl5dmnce+u0ahZnwP3XcRj8Jx+GdrYGAr0XT0VsSO3VSfYoRtI3CvIQDuvuQXy4crnSL4HSccGL/KMjfNJ6a3vJSag6CzphLLDDNS+9b/86Wm/FqGWQGAIhLLz6gpx1PBpsRH2dR0nTcYzSmnWPg5GvKd2pQYsEMS5zlrww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net; spf=pass smtp.mailfrom=posteo.net; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b=owbmq7T2; arc=none smtp.client-ip=185.67.36.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b="owbmq7T2" Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B2702240101 for ; Mon, 26 Jan 2026 11:14:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1769422493; bh=E6JNIXiL4/1bW0+UR+jZtVn2Er2iWLO91YkvCOZjL/A=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=owbmq7T2/vtAfzLEGwTf2Gx4bfyiEFpD9veYfet+wOnna+ZHL9iFCP9fyhV2WuKEA y47RKN+ZpaZw4tC7W7fFCgz7fngZGqgtZMj0c2GD87qwjYnoORJWLgFs5+U0epbRio vB/R5qiWWvFAJoAuRAaCs9+4T+BJ9O29O42G+DNx71P/EPycsUlZjJ4eapA64jHrz9 B3Ti46bI2DdvzSF/JXOu1j7mN3U65ia+qjOaK5VW54zivjESzzCCKVvnihP/DD69p7 2mpS0OQTv669oIHbggU4kjquci60Div97bD+Bm9bqfdqX+IAhT/7VmX99giV2hI4hT RRR3a3nQtWSwQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4f04CP3GGZz6tws; Mon, 26 Jan 2026 11:14:41 +0100 (CET) Date: Mon, 26 Jan 2026 10:14:46 +0000 From: Wilken Gottwalt To: Andy Shevchenko Cc: Wolfram Sang , linux-renesas-soc@vger.kernel.org, Alexandre Torgue , Andy Shevchenko , Antonio Borneo , Arnd Bergmann , Baolin Wang , Bjorn Andersson , Boqun Feng , Chen-Yu Tsai , Chunyan Zhang , Danilo Krummrich , David Lechner , Greg Kroah-Hartman , Ingo Molnar , Jernej Skrabec , Jonathan Cameron , Jonathan Corbet , Konrad Dybcio , Lee Jones , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, Mark Brown , Maxime Coquelin , Nuno =?ISO-8859-1?Q?S=E1?= , Orson Zhai , Peter Zijlstra , "Rafael J. Wysocki" , Samuel Holland , Shuah Khan , Srinivas Kandagatla , Thomas Gleixner , Waiman Long , Will Deacon Subject: Re: [RFC PATCH 0/4] hwspinlock: refactor headers into public provider/consumer pair Message-ID: <20260126111440.67394323@posteo.net> In-Reply-To: References: <20260125184654.17843-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 26 Jan 2026 11:59:43 +0200 Andy Shevchenko wrote: > On Sun, Jan 25, 2026 at 07:46:51PM +0100, Wolfram Sang wrote: > > TLDR: I want to create a hwspinlock provider outside of the hwspinlock > > directory. So, I refactored the headers into a provider/consumer pair. > > Which seems to me like a reasonable seperation anyhow. No functional > > changes. My build tests went fine and buildbots are happy, too. > > > > Longer explanation: > > > > There is a device (MFIS) in newer Renesas SoCs which combines various > > things like hwspinlocks, mailboxes and other stuff. Sadly, these are not > > strictly separated. Registers are kind of mixed and its register > > unprotection scheme will need one of its own locks. I tried various > > paths to handle this device (MFD, auxiliary bus) but I concluded that > > the sub-device dependencies give enough reasons for a single driver in > > drivers/soc/. So, this series will allow me to instantiate a hwspinlock > > provider from the other directory. > > > > Patches 1+2 do the actual refactoring with a fallback being in place. I > > used '-B' with git-format-patch in this RFC, so the actual changes are > > more visible when the headers are moved. > > > > Patch 3 converts all the users. There are not many. We could try to get > > all the acks for this single patch. Or I can break it into single > > patches and send them to subsystems. I don't mind. > > > > Patch 4 simply removes the fallback. > > > > Looking forward to comments on this approach. If the hwspinlock > > maintainers like it as is, I would kindly propose to apply patches 1+2 > > after 7.0-rc1 comes out. This might sound a bit hasty, but a) I want to > > avoid chasing a moving target and b) this would remove one dependency of > > the hwspinlock driver I originally intend to upstream, of course. > > > > I would take care of patches 3+4 as needed. > > > > A branch can be found here: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/hwspinlock/refactor-includes > > > > Patches are based on linux-next as of 2026-01-21. > > > > Opinions? > > I don't like the idea of sharing internal stuff. Why would we need to have > a struct hwspinlock to be visible? > I see what Wolfram wants to achieve. It is the same issue I encounterd while I wrote the sun6i hwspinlock driver. Currently it is impossible to write external (out-of-kernel-tree) drivers because of internal structures. And it was a pain in the ass for testing purposes. I prefer to be able to write external hwspinlock drivers. greetings