From: Antonio Borneo <antonio.borneo@foss.st.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
<linux-renesas-soc@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Orson Zhai <orsonzhai@gmail.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Wilken Gottwalt <wilken.gottwalt@posteo.net>,
Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
<linux-remoteproc@vger.kernel.org>, <linux-omap@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-sunxi@lists.linux.dev>
Subject: Re: [PATCH v4 04/15] hwspinlock: add callback to fill private data of a hwspinlock
Date: Tue, 17 Mar 2026 14:54:16 +0100 [thread overview]
Message-ID: <dd21653b7343e261ec9c88c622c5facbba69df95.camel@foss.st.com> (raw)
In-Reply-To: <20260310075539.11701-5-wsa+renesas@sang-engineering.com>
On Tue, 2026-03-10 at 08:55 +0100, Wolfram Sang 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@sang-engineering.com>
> ---
> 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 +-
> include/linux/hwspinlock.h | 4 ++--
> 8 files changed, 33 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
> index 2c9eceba7fe8..afe1e7ce2829 100644
> --- a/drivers/hwspinlock/hwspinlock_core.c
> +++ b/drivers/hwspinlock/hwspinlock_core.c
> @@ -507,6 +507,7 @@ static struct hwspinlock *hwspin_lock_unregister_single(unsigned int id)
> * @ops: hwspinlock handlers for this device
> * @base_id: id of the first hardware spinlock in this bank
> * @num_locks: number of hwspinlocks provided by this device
> + * @init_data: additional data passed on to the init_priv callback
> *
> * This function should be called from the underlying platform-specific
> * implementation, to register a new hwspinlock device instance.
> @@ -516,10 +517,11 @@ static struct hwspinlock *hwspin_lock_unregister_single(unsigned int id)
> * Returns: %0 on success, or an appropriate error code on failure
> */
> int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
> - const struct hwspinlock_ops *ops, int base_id, int num_locks)
> + const struct hwspinlock_ops *ops, int base_id, int num_locks,
> + void *init_data)
Hi Wolfram,
this API is described in Documentation/locking/hwspinlock.rst
in chapter 'API for implementors'.
Changing the API parameters should require updating the documentation too.
Since this API is changed again in 10/15, it's probably fine to update the
documentation only once in the last 15/15.
Best Regards,
Antonio
next prev parent reply other threads:[~2026-03-17 13:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 7:55 [PATCH v4 00/15] hwspinlock: move device alloc into core and refactor includes Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 01/15] hwspinlock: u8500: delete driver Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 02/15] hwspinlock: remove now unused pdata from header file Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 03/15] hwspinlock: add helpers to retrieve core data Wolfram Sang
2026-03-10 9:32 ` Chen-Yu Tsai
2026-03-10 7:55 ` [PATCH v4 04/15] hwspinlock: add callback to fill private data of a hwspinlock Wolfram Sang
2026-03-17 13:54 ` Antonio Borneo [this message]
2026-03-18 10:31 ` Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 05/15] hwspinlock: omap: use new callback to initialize hwspinlock priv Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 06/15] hwspinlock: qcom: " Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 07/15] hwspinlock: sprd: " Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 08/15] hwspinlock: stm32: " Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 09/15] hwspinlock: sun6i: " Wolfram Sang
2026-03-10 9:39 ` Chen-Yu Tsai
2026-03-10 10:03 ` Wolfram Sang
2026-03-10 10:22 ` Wilken Gottwalt
2026-03-10 7:55 ` [PATCH v4 10/15] hwspinlock: handle hwspinlock device allocation in the core Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 11/15] hwspinlock: move entries from internal to public header Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 12/15] hwspinlock: remove internal header Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 13/15] hwspinlock: sort include and update copyright Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 14/15] hwspinlock: refactor provider.h from public header Wolfram Sang
2026-03-10 7:55 ` [PATCH v4 15/15] hwspinlock/treewide: refactor consumer.h " Wolfram Sang
2026-03-11 9:24 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd21653b7343e261ec9c88c622c5facbba69df95.camel@foss.st.com \
--to=antonio.borneo@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=mcoquelin.stm32@gmail.com \
--cc=orsonzhai@gmail.com \
--cc=samuel@sholland.org \
--cc=wens@kernel.org \
--cc=wilken.gottwalt@posteo.net \
--cc=wsa+renesas@sang-engineering.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®