259-regmap_dynamic.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. + select REGMAP
  32. tristate
  33. config REGMAP_IRQ
  34. + select REGMAP
  35. bool
  36. --- a/include/linux/regmap.h
  37. +++ b/include/linux/regmap.h
  38. @@ -50,7 +50,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,6 +1,8 @@
  48. -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
  49. -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
  50. -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
  51. +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o regcache-flat.o
  52. +ifdef CONFIG_DEBUG_FS
  53. +regmap-core-objs += regmap-debugfs.o
  54. +endif
  55. +obj-$(CONFIG_REGMAP) += regmap-core.o
  56. obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
  57. obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
  58. obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
  59. --- a/drivers/base/regmap/regmap.c
  60. +++ b/drivers/base/regmap/regmap.c
  61. @@ -13,6 +13,7 @@
  62. #include <linux/device.h>
  63. #include <linux/slab.h>
  64. #include <linux/export.h>
  65. +#include <linux/module.h>
  66. #include <linux/mutex.h>
  67. #include <linux/err.h>
  68. #include <linux/of.h>
  69. @@ -2636,3 +2637,5 @@ static int __init regmap_initcall(void)
  70. return 0;
  71. }
  72. postcore_initcall(regmap_initcall);
  73. +
  74. +MODULE_LICENSE("GPL");