Skip to content

Commit 47ee108

Browse files
committed
regmap: Provide user selectable option to enable regmap
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>
1 parent 875403a commit 47ee108

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

drivers/base/regmap/Kconfig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# subsystems should select the appropriate symbols.
55

66
config REGMAP
7-
bool "Register Map support" if KUNIT_ALL_TESTS
7+
bool
88
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)
99
select IRQ_DOMAIN if REGMAP_IRQ
1010
select MDIO_BUS if REGMAP_MDIO
@@ -23,6 +23,16 @@ config REGMAP_KUNIT
2323
default KUNIT_ALL_TESTS
2424
select REGMAP_RAM
2525

26+
config REGMAP_BUILD
27+
bool "Enable regmap build"
28+
depends on KUNIT
29+
select REGMAP
30+
help
31+
This option exists purely to allow the regmap KUnit tests to
32+
be enabled without having to enable some driver that uses
33+
regmap due to unfortunate issues with how KUnit tests are
34+
normally enabled.
35+
2636
config REGMAP_AC97
2737
tristate
2838

tools/testing/kunit/configs/all_tests.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ CONFIG_DAMON_PADDR=y
3333
CONFIG_DEBUG_FS=y
3434
CONFIG_DAMON_DBGFS=y
3535

36+
CONFIG_REGMAP_BUILD=y
37+
3638
CONFIG_SECURITY=y
3739
CONFIG_SECURITY_APPARMOR=y

0 commit comments

Comments
 (0)