Re: [PATCH v5 04/15] hwspinlock: add callback to fill private data of a hwspinlock
From: Chen-Yu Tsai
Date: Thu Mar 19 2026 - 09:08:10 EST
On Thu, Mar 19, 2026 at 7:00 PM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxx> # for sun6i