mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 10/11] mfd: stm32-timers: remove dependency of mfd/stm32-timers.h on regmap.h
Date: Fri, 20 Oct 2023 09:18:52 +0200	[thread overview]
Message-ID: <20231020071853.2826528-11-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20231020071853.2826528-1-a.fatoum@pengutronix.de>

Drivers for the STM32 timer MFD and the PWM within it used regmap API
without directly including the regmap.h header. Fix that and replace
the regmap.h inclusion in mfd/stm32-timers.h with a forward declaration.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mfd/stm32-timers.c       | 1 +
 drivers/pwm/pwm-stm32.c          | 1 +
 include/linux/mfd/stm32-timers.h | 3 ++-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
index a7e9f53dbfbd..3b478001051b 100644
--- a/drivers/mfd/stm32-timers.c
+++ b/drivers/mfd/stm32-timers.c
@@ -11,6 +11,7 @@
 #include <io.h>
 #include <linux/bitfield.h>
 #include <linux/mfd/stm32-timers.h>
+#include <linux/regmap.h>
 #include <of.h>
 #include <linux/reset.h>
 
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index e73e9965576a..5c2029ab6ad6 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -14,6 +14,7 @@
 #include <io.h>
 #include <linux/bitfield.h>
 #include <linux/mfd/stm32-timers.h>
+#include <linux/regmap.h>
 #include <linux/math64.h>
 #include <of.h>
 #include <pwm.h>
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h
index 28fad44598f9..35aa0681baeb 100644
--- a/include/linux/mfd/stm32-timers.h
+++ b/include/linux/mfd/stm32-timers.h
@@ -8,7 +8,6 @@
 #define _LINUX_STM32_GPTIMER_H_
 
 #include <clock.h>
-#include <regmap.h>
 
 #define TIM_CR1		0x00	/* Control Register 1      */
 #define TIM_CR2		0x04	/* Control Register 2      */
@@ -88,6 +87,8 @@
 #define TIM_BDTR_BKF_SHIFT	16
 #define TIM_BDTR_BK2F_SHIFT	20
 
+struct regmap;
+
 struct stm32_timers {
 	struct clk *clk;
 	struct regmap *regmap;
-- 
2.39.2




  parent reply	other threads:[~2023-10-20  7:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20  7:18 [PATCH 00/11] regmap: align regmap_bulk_read/write API with Linux Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 01/11] regmap: add support for bulk 64-bit reads and writes Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 02/11] nvmem: regmap: do not use regmap_bulk_read Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 03/11] regmap: move regmap.h content to linux/regmap.h Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 04/11] regmap: align regmap_bulk_read/write API with Linux Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 05/11] mfd: syscon: do not include regmap.h from mfd/syscon.h Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 06/11] mfd: axp20x: remove dependency on regmap.h Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 07/11] mfd: pfuze: disable mfd/pfuze.h " Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 08/11] mfd: atmel-smc: remove dependency of mfd/syscon/atmel-smc.h " Ahmad Fatoum
2023-10-20  7:18 ` [PATCH 09/11] mfd: atmel-smc: include needed headers directly Ahmad Fatoum
2023-10-20  7:18 ` Ahmad Fatoum [this message]
2023-10-20  7:18 ` [PATCH 11/11] treewide: switch regmap.h include to linux/regmap.h Ahmad Fatoum
2023-10-23  9:45 ` [PATCH 00/11] regmap: align regmap_bulk_read/write API with Linux Sascha Hauer

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=20231020071853.2826528-11-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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