kernel: update 3.14 to 3.14.25
[openwrt/openwrt.git] / target / linux / generic / patches-3.14 / 259-regmap_dynamic.patch
1 --- a/drivers/base/regmap/Kconfig
2 +++ b/drivers/base/regmap/Kconfig
3 @@ -3,23 +3,28 @@
4 # subsystems should select the appropriate symbols.
5
6 config REGMAP
7 - default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_MMIO || REGMAP_IRQ)
8 select LZO_COMPRESS
9 select LZO_DECOMPRESS
10 select IRQ_DOMAIN if REGMAP_IRQ
11 - bool
12 + tristate "Regmap"
13
14 config REGMAP_I2C
15 - tristate
16 + select REGMAP
17 + tristate "Regmap I2C"
18
19 config REGMAP_SPI
20 - tristate
21 + select REGMAP
22 + depends on SPI_MASTER
23 + tristate "Regmap SPI"
24
25 config REGMAP_SPMI
26 + select REGMAP
27 tristate
28
29 config REGMAP_MMIO
30 + select REGMAP
31 tristate
32
33 config REGMAP_IRQ
34 + select REGMAP
35 bool
36 --- a/include/linux/regmap.h
37 +++ b/include/linux/regmap.h
38 @@ -49,7 +49,7 @@ struct reg_default {
39 unsigned int def;
40 };
41
42 -#ifdef CONFIG_REGMAP
43 +#if IS_ENABLED(CONFIG_REGMAP)
44
45 enum regmap_endian {
46 /* Unspecified -> 0 -> Backwards compatible default */
47 --- a/drivers/base/regmap/Makefile
48 +++ b/drivers/base/regmap/Makefile
49 @@ -1,6 +1,8 @@
50 -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
51 -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
52 -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
53 +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
54 +ifdef CONFIG_DEBUG_FS
55 +regmap-core-objs += regmap-debugfs.o
56 +endif
57 +obj-$(CONFIG_REGMAP) += regmap-core.o
58 obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
59 obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
60 obj-$(CONFIG_REGMAP_SPMI) += regmap-spmi.o
61 --- a/drivers/base/regmap/regmap.c
62 +++ b/drivers/base/regmap/regmap.c
63 @@ -13,6 +13,7 @@
64 #include <linux/device.h>
65 #include <linux/slab.h>
66 #include <linux/export.h>
67 +#include <linux/module.h>
68 #include <linux/mutex.h>
69 #include <linux/err.h>
70 #include <linux/rbtree.h>
71 @@ -2252,3 +2253,5 @@ static int __init regmap_initcall(void)
72 return 0;
73 }
74 postcore_initcall(regmap_initcall);
75 +
76 +MODULE_LICENSE("GPL");