1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
4 # subsystems should select the appropriate symbols.
7 - default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ)
10 select IRQ_DOMAIN if REGMAP_IRQ
20 + tristate "Regmap I2C"
26 + tristate "Regmap SPI"
28 + depends on SPI_MASTER
38 + tristate "Regmap MMIO"
44 --- a/include/linux/regmap.h
45 +++ b/include/linux/regmap.h
46 @@ -135,7 +135,7 @@ struct reg_sequence {
47 pollret ?: ((cond) ? 0 : -ETIMEDOUT); \
51 +#if IS_ENABLED(CONFIG_REGMAP)
54 /* Unspecified -> 0 -> Backwards compatible default */
55 --- a/drivers/base/regmap/Makefile
56 +++ b/drivers/base/regmap/Makefile
58 # For include/trace/define_trace.h to include trace.h
59 CFLAGS_regmap.o := -I$(src)
61 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
62 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
63 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
64 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
65 +ifdef CONFIG_DEBUG_FS
66 +regmap-core-objs += regmap-debugfs.o
68 +obj-$(CONFIG_REGMAP) += regmap-core.o
69 obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
70 obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
71 obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
72 --- a/drivers/base/regmap/regmap.c
73 +++ b/drivers/base/regmap/regmap.c
75 #include <linux/device.h>
76 #include <linux/slab.h>
77 #include <linux/export.h>
78 +#include <linux/module.h>
79 #include <linux/mutex.h>
80 #include <linux/err.h>
82 @@ -2913,3 +2914,5 @@ static int __init regmap_initcall(void)
85 postcore_initcall(regmap_initcall);
87 +MODULE_LICENSE("GPL");