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_MMIO || REGMAP_IRQ)
10 select IRQ_DOMAIN if REGMAP_IRQ
16 + tristate "Regmap I2C"
22 + tristate "Regmap SPI"
24 + depends on SPI_MASTER
39 --- a/include/linux/regmap.h
40 +++ b/include/linux/regmap.h
41 @@ -49,7 +49,7 @@ struct reg_default {
46 +#if IS_ENABLED(CONFIG_REGMAP)
49 /* Unspecified -> 0 -> Backwards compatible default */
50 --- a/drivers/base/regmap/Makefile
51 +++ b/drivers/base/regmap/Makefile
53 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
54 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
55 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
56 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
57 +ifdef CONFIG_DEBUG_FS
58 +regmap-core-objs += regmap-debugfs.o
60 +obj-$(CONFIG_REGMAP) += regmap-core.o
61 obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
62 obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
63 obj-$(CONFIG_REGMAP_SPMI) += regmap-spmi.o
64 --- a/drivers/base/regmap/regmap.c
65 +++ b/drivers/base/regmap/regmap.c
67 #include <linux/device.h>
68 #include <linux/slab.h>
69 #include <linux/export.h>
70 +#include <linux/module.h>
71 #include <linux/mutex.h>
72 #include <linux/err.h>
74 @@ -2635,3 +2636,5 @@ static int __init regmap_initcall(void)
77 postcore_initcall(regmap_initcall);
79 +MODULE_LICENSE("GPL");