--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
-@@ -3,23 +3,28 @@
+@@ -3,9 +3,8 @@
# subsystems should select the appropriate symbols.
config REGMAP
- default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_MMIO || REGMAP_IRQ)
- select LZO_COMPRESS
- select LZO_DECOMPRESS
select IRQ_DOMAIN if REGMAP_IRQ
- bool
+ tristate "Regmap"
+ config REGCACHE_COMPRESSED
+ select LZO_COMPRESS
+@@ -13,19 +12,25 @@ config REGCACHE_COMPRESSED
+ bool
+
config REGMAP_I2C
- tristate
++ tristate "Regmap I2C"
+ select REGMAP
-+ tristate "Regmap I2C
+ depends on I2C
config REGMAP_SPI
- tristate
++ tristate "Regmap SPI"
+ select REGMAP
+ depends on SPI_MASTER
-+ tristate "Regmap SPI"
+ depends on SPI
config REGMAP_SPMI
+ select REGMAP
tristate
+ depends on SPMI
config REGMAP_MMIO
+- tristate
++ tristate "Regmap MMIO"
+ select REGMAP
- tristate
config REGMAP_IRQ
+ select REGMAP
/* Unspecified -> 0 -> Backwards compatible default */
--- a/drivers/base/regmap/Makefile
+++ b/drivers/base/regmap/Makefile
-@@ -1,6 +1,8 @@
+@@ -1,7 +1,11 @@
-obj-$(CONFIG_REGMAP) += regmap.o regcache.o
--obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
+-obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o
+-obj-$(CONFIG_REGCACHE_COMPRESSED) += regcache-lzo.o
-obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
-+regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
++regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-flat.o
+ifdef CONFIG_DEBUG_FS
+regmap-core-objs += regmap-debugfs.o
+endif
++ifdef CONFIG_REGCACHE_COMPRESSED
++regmap-core-objs += regcache-lzo.o
++endif
+obj-$(CONFIG_REGMAP) += regmap-core.o
obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
+#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/err.h>
- #include <linux/rbtree.h>
-@@ -2247,3 +2248,5 @@ static int __init regmap_initcall(void)
+ #include <linux/of.h>
+@@ -2630,3 +2631,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);