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_MMIO || REGMAP_IRQ)
10 select IRQ_DOMAIN if REGMAP_IRQ
17 + tristate "Regmap I2C"
22 + tristate "Regmap SPI"
31 --- a/include/linux/regmap.h
32 +++ b/include/linux/regmap.h
33 @@ -45,7 +45,7 @@ struct reg_default {
38 +#if IS_ENABLED(CONFIG_REGMAP)
41 /* Unspecified -> 0 -> Backwards compatible default */
42 --- a/drivers/base/regmap/Makefile
43 +++ b/drivers/base/regmap/Makefile
45 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
46 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
47 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
48 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
49 +ifdef CONFIG_DEBUG_FS
50 +regmap-core-objs += regmap-debugfs.o
52 +obj-$(CONFIG_REGMAP) += regmap-core.o
53 obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
54 obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
55 obj-$(CONFIG_REGMAP_MMIO) += regmap-mmio.o
56 --- a/drivers/base/regmap/regmap.c
57 +++ b/drivers/base/regmap/regmap.c
59 #include <linux/device.h>
60 #include <linux/slab.h>
61 #include <linux/export.h>
62 +#include <linux/module.h>
63 #include <linux/mutex.h>
64 #include <linux/err.h>
65 #include <linux/rbtree.h>
66 @@ -1777,3 +1778,5 @@ static int __init regmap_initcall(void)
69 postcore_initcall(regmap_initcall);
71 +MODULE_LICENSE("GPL");