mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC] regmap: Move selecting for REGMAP_MDIO and REGMAP_IRQ
@ 2025-05-16 14:17 Andrew Davis
  2025-05-18 12:25 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andrew Davis @ 2025-05-16 14:17 UTC (permalink / raw)
  To: Mark Brown, Krzysztof Kozlowski; +Cc: linux-kernel, Andrew Davis

If either REGMAP_IRQ or REGMAP_MDIO are set then REGMAP is also set.
This then enables the selecting of IRQ_DOMAIN or MDIO_BUS from REGMAP
based on the above two symbols respectively. This makes it very easy
to end up with "circular dependencies".

Instead select the IRQ_DOMAIN or MDIO_BUS from the symbols that make
use of them. This is almost equivalent to before but makes it less
likely to end up with false circular dependency detections.

Signed-off-by: Andrew Davis <afd@ti.com>
---

Sending as RFC as I haven't tested all the possible permutations
on config options right now to make sure this causes no changes,
but wanted to suggest this as a possible solution to the circular
dependency described here[0].

[0] https://www.spinics.net/lists/kernel/msg5686254.html

 drivers/base/regmap/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index b1affac70d5dc..ffb2ef4882981 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -6,8 +6,6 @@
 config REGMAP
 	bool
 	default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO || REGMAP_FSI)
-	select IRQ_DOMAIN if REGMAP_IRQ
-	select MDIO_BUS if REGMAP_MDIO
 	help
 	  Enable support for the Register Map (regmap) access API.
 
@@ -58,12 +56,14 @@ config REGMAP_W1
 
 config REGMAP_MDIO
 	tristate
+	select MDIO_BUS
 
 config REGMAP_MMIO
 	tristate
 
 config REGMAP_IRQ
 	bool
+	select IRQ_DOMAIN
 
 config REGMAP_RAM
 	tristate
-- 
2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-21 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-16 14:17 [PATCH RFC] regmap: Move selecting for REGMAP_MDIO and REGMAP_IRQ Andrew Davis
2025-05-18 12:25 ` Krzysztof Kozlowski
2025-05-19 10:12 ` Mark Brown
2025-05-20  2:28   ` Andrew Davis
2025-05-21 15:04 ` Mark Brown

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®