259-regmap_dynamic.patch 1.9 KB

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