From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Mark Brown" <broonie@kernel.org>,
"Jonathan Cameron" <jonathan.cameron@huawei.com>,
"Lee Jones" <lee@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Linus Walleij" <linusw@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Waiman Long" <longman@redhat.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Orson Zhai" <orsonzhai@gmail.com>,
"Chunyan Zhang" <zhang.lyra@gmail.com>,
"Thomas Gleixner" <tglx@kernel.org>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Srinivas Kandagatla" <srini@kernel.org>,
"Antonio Borneo" <antonio.borneo@foss.st.com>,
"Konrad Dybcio" <konradybcio@kernel.org>,
linux-remoteproc@vger.kernel.org, linux-doc@vger.kernel.org,
driver-core@lists.linux.dev, linux-iio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org
Subject: [PATCH v5 15/15] hwspinlock/treewide: refactor consumer.h from public header
Date: Thu, 19 Mar 2026 11:59:37 +0100 [thread overview]
Message-ID: <20260319105947.6237-16-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20260319105947.6237-1-wsa+renesas@sang-engineering.com>
Factor out the entries only needed for consumers from the generic public
header. This allows for a clean separation between providers and
consumers. Also remove contact field in favor of MAINTAINERS entries.
Fix the users, too.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com> # for IIO
Acked-by: Lee Jones <lee@kernel.org> # for MFD
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Linus Walleij <linusw@kernel.org>
---
Documentation/locking/hwspinlock.rst | 2 +-
MAINTAINERS | 1 -
drivers/base/regmap/regmap.c | 2 +-
drivers/hwspinlock/hwspinlock_core.c | 2 +-
drivers/iio/adc/sc27xx_adc.c | 2 +-
drivers/irqchip/irq-stm32mp-exti.c | 2 +-
drivers/mfd/syscon.c | 2 +-
drivers/nvmem/sc27xx-efuse.c | 2 +-
drivers/nvmem/sprd-efuse.c | 2 +-
drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +-
drivers/soc/qcom/smem.c | 2 +-
drivers/spi/spi-sprd-adi.c | 2 +-
.../linux/{hwspinlock.h => hwspinlock/consumer.h} | 15 ++++++---------
13 files changed, 17 insertions(+), 21 deletions(-)
rename include/linux/{hwspinlock.h => hwspinlock/consumer.h} (98%)
diff --git a/Documentation/locking/hwspinlock.rst b/Documentation/locking/hwspinlock.rst
index 6cf1975b4291..ae2d2007a442 100644
--- a/Documentation/locking/hwspinlock.rst
+++ b/Documentation/locking/hwspinlock.rst
@@ -306,7 +306,7 @@ Typical usage
::
- #include <linux/hwspinlock.h>
+ #include <linux/hwspinlock/consumer.h>
#include <linux/err.h>
int hwspinlock_example(void)
diff --git a/MAINTAINERS b/MAINTAINERS
index 117aa8d118b1..dc14679bcc31 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11212,7 +11212,6 @@ F: Documentation/devicetree/bindings/hwlock/
F: Documentation/locking/hwspinlock.rst
F: drivers/hwspinlock/
F: include/linux/hwspinlock/
-F: include/linux/hwspinlock.h
HARDWARE TRACING FACILITIES
M: Alexander Shishkin <alexander.shishkin@linux.intel.com>
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 607c1246d994..d25494495469 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -16,7 +16,7 @@
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/log2.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/unaligned.h>
#define CREATE_TRACE_POINTS
diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index 6c8a03deb00c..e78ec4b5cfa3 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -12,7 +12,7 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/hwspinlock/provider.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
diff --git a/drivers/iio/adc/sc27xx_adc.c b/drivers/iio/adc/sc27xx_adc.c
index 6209499c5c37..8a881d63b7dd 100644
--- a/drivers/iio/adc/sc27xx_adc.c
+++ b/drivers/iio/adc/sc27xx_adc.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2018 Spreadtrum Communications Inc.
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mutex.h>
diff --git a/drivers/irqchip/irq-stm32mp-exti.c b/drivers/irqchip/irq-stm32mp-exti.c
index a24f4f1a4f8f..25d5aa67728a 100644
--- a/drivers/irqchip/irq-stm32mp-exti.c
+++ b/drivers/irqchip/irq-stm32mp-exti.c
@@ -6,7 +6,7 @@
*/
#include <linux/bitops.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 21a7fcdd2737..8ec74f8513d7 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -11,7 +11,7 @@
#include <linux/cleanup.h>
#include <linux/clk.h>
#include <linux/err.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/of.h>
diff --git a/drivers/nvmem/sc27xx-efuse.c b/drivers/nvmem/sc27xx-efuse.c
index 4e2ffefac96c..309090cd4ff0 100644
--- a/drivers/nvmem/sc27xx-efuse.c
+++ b/drivers/nvmem/sc27xx-efuse.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2018 Spreadtrum Communications Inc.
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c
index 1a7e4e5d8b86..92e3092719ba 100644
--- a/drivers/nvmem/sprd-efuse.c
+++ b/drivers/nvmem/sprd-efuse.c
@@ -3,7 +3,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/nvmem-provider.h>
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 6a99708a5a23..17b2072d609e 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -10,7 +10,7 @@
#include <linux/clk.h>
#include <linux/export.h>
#include <linux/gpio/driver.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/mfd/syscon.h>
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index d5c94b47f431..6d574d65b4a3 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -4,7 +4,7 @@
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*/
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index e7d83c16b46c..04313e4a63dd 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -5,7 +5,7 @@
*/
#include <linux/delay.h>
-#include <linux/hwspinlock.h>
+#include <linux/hwspinlock/consumer.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock/consumer.h
similarity index 98%
rename from include/linux/hwspinlock.h
rename to include/linux/hwspinlock/consumer.h
index 4fe1c8831cd1..f476222ec924 100644
--- a/include/linux/hwspinlock.h
+++ b/include/linux/hwspinlock/consumer.h
@@ -1,17 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Hardware spinlock public header
+ * Hardware spinlock public header for consumers
*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com
- *
- * Contact: Ohad Ben-Cohen <ohad@wizery.com>
+ * Copyright (C) 2026 Sang Engineering
+ * Copyright (C) 2026 Renesas Solutions Corp.
*/
-#ifndef __LINUX_HWSPINLOCK_H
-#define __LINUX_HWSPINLOCK_H
+#ifndef __LINUX_HWSPINLOCK_CONSUMER_H
+#define __LINUX_HWSPINLOCK_CONSUMER_H
#include <linux/err.h>
-#include <linux/sched.h>
/* hwspinlock mode argument */
#define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */
@@ -22,8 +21,6 @@
struct device;
struct device_node;
struct hwspinlock;
-struct hwspinlock_device;
-struct hwspinlock_ops;
#ifdef CONFIG_HWSPINLOCK
@@ -403,4 +400,4 @@ static inline void hwspin_unlock(struct hwspinlock *hwlock)
__hwspin_unlock(hwlock, 0, NULL);
}
-#endif /* __LINUX_HWSPINLOCK_H */
+#endif /* __LINUX_HWSPINLOCK_CONSUMER_H */
--
2.51.0
next prev parent reply other threads:[~2026-03-19 11:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 10:59 [PATCH v5 00/15] hwspinlock: move device alloc into core and refactor includes Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 01/15] hwspinlock: u8500: delete driver Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 02/15] hwspinlock: remove now unused pdata from header file Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 03/15] hwspinlock: add helpers to retrieve core data Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 04/15] hwspinlock: add callback to fill private data of a hwspinlock Wolfram Sang
2026-03-19 13:07 ` Chen-Yu Tsai
2026-03-19 10:59 ` [PATCH v5 05/15] hwspinlock: omap: use new callback to initialize hwspinlock priv Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 06/15] hwspinlock: qcom: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 07/15] hwspinlock: sprd: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 08/15] hwspinlock: stm32: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 09/15] hwspinlock: sun6i: " Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 10/15] hwspinlock: handle hwspinlock device allocation in the core Wolfram Sang
2026-03-19 13:09 ` Chen-Yu Tsai
2026-03-19 10:59 ` [PATCH v5 11/15] hwspinlock: move entries from internal to public header Wolfram Sang
2026-03-19 13:09 ` Chen-Yu Tsai
2026-03-19 10:59 ` [PATCH v5 12/15] hwspinlock: remove internal header Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 13/15] hwspinlock: sort include and update copyright Wolfram Sang
2026-03-19 10:59 ` [PATCH v5 14/15] hwspinlock: refactor provider.h from public header Wolfram Sang
2026-03-19 13:10 ` Chen-Yu Tsai
2026-03-19 10:59 ` Wolfram Sang [this message]
2026-03-27 11:43 ` [PATCH v5 00/15] hwspinlock: move device alloc into core and refactor includes Wolfram Sang
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=20260319105947.6237-16-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=andy@kernel.org \
--cc=antonio.borneo@foss.st.com \
--cc=arnd@arndb.de \
--cc=baolin.wang@linux.alibaba.com \
--cc=boqun@kernel.org \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=dlechner@baylibre.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=jonathan.cameron@huawei.com \
--cc=konradybcio@kernel.org \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=longman@redhat.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mingo@redhat.com \
--cc=nuno.sa@analog.com \
--cc=orsonzhai@gmail.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=srini@kernel.org \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
--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®