2
0

259-regmap_dynamic.patch 2.1 KB

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