259-regmap_dynamic.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --- a/drivers/base/regmap/Kconfig
  2. +++ b/drivers/base/regmap/Kconfig
  3. @@ -3,9 +3,8 @@
  4. # subsystems should select the appropriate symbols.
  5. config REGMAP
  6. - default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_MMIO || REGMAP_IRQ)
  7. select IRQ_DOMAIN if REGMAP_IRQ
  8. - bool
  9. + tristate "Regmap"
  10. config REGCACHE_COMPRESSED
  11. select LZO_COMPRESS
  12. @@ -13,19 +12,25 @@ config REGCACHE_COMPRESSED
  13. bool
  14. config REGMAP_I2C
  15. - tristate
  16. + tristate "Regmap I2C"
  17. + select REGMAP
  18. depends on I2C
  19. config REGMAP_SPI
  20. - tristate
  21. + tristate "Regmap SPI"
  22. + select REGMAP
  23. + depends on SPI_MASTER
  24. depends on SPI
  25. config REGMAP_SPMI
  26. + select REGMAP
  27. tristate
  28. depends on SPMI
  29. config REGMAP_MMIO
  30. - tristate
  31. + tristate "Regmap MMIO"
  32. + select REGMAP
  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. -#ifdef CONFIG_REGMAP
  42. +#if IS_ENABLED(CONFIG_REGMAP)
  43. enum regmap_endian {
  44. /* Unspecified -> 0 -> Backwards compatible default */
  45. --- a/drivers/base/regmap/Makefile
  46. +++ b/drivers/base/regmap/Makefile
  47. @@ -1,7 +1,11 @@
  48. -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
  49. -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o
  50. -obj-$(CONFIG_REGCACHE_COMPRESSED) += regcache-lzo.o
  51. -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
  52. +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-flat.o
  53. +ifdef CONFIG_DEBUG_FS
  54. +regmap-core-objs += regmap-debugfs.o
  55. +endif
  56. +ifdef CONFIG_REGCACHE_COMPRESSED
  57. +regmap-core-objs += regcache-lzo.o
  58. +endif
  59. +obj-$(CONFIG_REGMAP) += regmap-core.o
  60. obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
  61. obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
  62. obj-$(CONFIG_REGMAP_SPMI) += regmap-spmi.o
  63. --- a/drivers/base/regmap/regmap.c
  64. +++ b/drivers/base/regmap/regmap.c
  65. @@ -13,6 +13,7 @@
  66. #include <linux/device.h>
  67. #include <linux/slab.h>
  68. #include <linux/export.h>
  69. +#include <linux/module.h>
  70. #include <linux/mutex.h>
  71. #include <linux/err.h>
  72. #include <linux/of.h>
  73. @@ -2630,3 +2631,5 @@ static int __init regmap_initcall(void)
  74. return 0;
  75. }
  76. postcore_initcall(regmap_initcall);
  77. +
  78. +MODULE_LICENSE("GPL");