]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
regmap: Provide user selectable option to enable regmap
authorMark Brown <broonie@kernel.org>
Tue, 11 Jul 2023 23:21:52 +0000 (00:21 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 13 Jul 2023 15:20:28 +0000 (16:20 +0100)
Since apparently enabling all the KUnit tests shouldn't enable any new
subsystems it is hard to enable the regmap KUnit tests in normal KUnit
testing scenarios that don't enable any drivers.  Add a Kconfig option
to help with this and include it in the KUnit all tests config.

Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230712-regmap-kunit-enable-v1-1-13e296bd0204@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/Kconfig
tools/testing/kunit/configs/all_tests.config

index 0db2021f7477f2abd40ee69ff23dd759dbc6a1a7..b1affac70d5dcc290b9bf644bd138f7cbd79dbc0 100644 (file)
@@ -4,7 +4,7 @@
 # subsystems should select the appropriate symbols.
 
 config REGMAP
-       bool "Register Map support" if KUNIT_ALL_TESTS
+       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
@@ -23,6 +23,16 @@ config REGMAP_KUNIT
        default KUNIT_ALL_TESTS
        select REGMAP_RAM
 
+config REGMAP_BUILD
+       bool "Enable regmap build"
+       depends on KUNIT
+       select REGMAP
+       help
+         This option exists purely to allow the regmap KUnit tests to
+         be enabled without having to enable some driver that uses
+         regmap due to unfortunate issues with how KUnit tests are
+         normally enabled.
+
 config REGMAP_AC97
        tristate
 
index 0393940c706a6199451337f7cedffee597b2cd20..873f3e06ccad8611adf0e058e9206d062348cb6e 100644 (file)
@@ -33,5 +33,7 @@ CONFIG_DAMON_PADDR=y
 CONFIG_DEBUG_FS=y
 CONFIG_DAMON_DBGFS=y
 
+CONFIG_REGMAP_BUILD=y
+
 CONFIG_SECURITY=y
 CONFIG_SECURITY_APPARMOR=y