259-regmap_dynamic.patch 1.8 KB

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