[PATCH v5 04/15] hwspinlock: add callback to fill private data of a hwspinlock

Chen-Yu Tsai wens at kernel.org
Thu Mar 19 06:07:52 PDT 2026


On Thu, Mar 19, 2026 at 7:00 PM Wolfram Sang
<wsa+renesas at sang-engineering.com> wrote:
>
> To hide internal core structures from providers, a callback is added to
> the ops which allows to set the 'priv' field of a hwspinlock. It is
> called when a hwspinlock device is registered and, thus, iterated over
> all locks. The register-functions are also extended to pass a data
> pointer to this callback, so it can do necessary calculations for the
> priv field of each hwspinlock. Providers are added only an empty
> placeholder and are converted separately because these changes need
> dedicated reviews.
>
> Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
> ---
>  Documentation/locking/hwspinlock.rst     |  3 ++-
>  drivers/hwspinlock/hwspinlock_core.c     | 19 +++++++++++++++----
>  drivers/hwspinlock/hwspinlock_internal.h | 19 +++++++++++--------
>  drivers/hwspinlock/omap_hwspinlock.c     |  2 +-
>  drivers/hwspinlock/qcom_hwspinlock.c     |  2 +-
>  drivers/hwspinlock/sprd_hwspinlock.c     |  2 +-
>  drivers/hwspinlock/stm32_hwspinlock.c    |  2 +-
>  drivers/hwspinlock/sun6i_hwspinlock.c    |  2 +-

Acked-by: Chen-Yu Tsai <wens at kernel.org> # for sun6i



More information about the linux-arm-kernel mailing list