On Thu, Mar 19, 2026 at 11:59:22AM +0100, Wolfram Sang wrote: > Changes since v4: > > * update Documentation, too, when ABI gets changed (Thanks Antonio!) > * rebased to 7.0-rc4 > * added more tags (Thanks!) > > My ultimate goal is to allow hwspinlock provider drivers outside of the > subsystem directory. It turned out that a simple split of the headers > files into a public provider and a public consumer header file is not > enough because core internal structures need to stay hidden. Even more, > their opaqueness could and should even be increased. That would also > allow the core to handle the de-/allocation of the hwspinlock device > itself. > > This series does all that. Patches 1-2 remove the meanwhile unused > platform_data to ease further refactoring. Patches 3-9 abstract access > to internal structures away using helpers. Patch 10 then moves > hwspinlock device handling to the core, simplifying drivers. The > remaining patches refactor the headers until the internal one is gone > and the public ones are divided into provider and consumer parts. More > details are given in the patch descriptions. > > One note about using a callback to initialize hwspinlock priv: I also > experimented with a dedicated 'set_priv' helper function. It felt a bit > clumsy to me. Drivers would need to save the 'bank' pointer again and > iterate over it. Because most drivers will only have a simple callback > anyhow, it looked leaner to me. > > This series has been tested on a Renesas SparrowHawk board (R-Car V4H) > with a yet-to-be-upstreamed hwspinlock driver for the MFIS IP core. A > branch can be found here (without the MFIS driver currently): > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git > renesas/hwspinlock/refactor-alloc-buildtest > > Build bots reported success.
Sashiko found some valid issues[1], so I am already working on a v6. [1] https://sashiko.dev/#/patchset/20260319105947.6237-1-wsa%2Brenesas%40sang-engineering.com

