270-regmap_dynamic.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- a/drivers/base/regmap/Kconfig
  2. +++ b/drivers/base/regmap/Kconfig
  3. @@ -3,16 +3,18 @@
  4. # subsystems should select the appropriate symbols.
  5. config REGMAP
  6. - default y if (REGMAP_I2C || REGMAP_SPI)
  7. select LZO_COMPRESS
  8. select LZO_DECOMPRESS
  9. - bool
  10. + tristate "Regmap"
  11. config REGMAP_I2C
  12. - tristate
  13. + select REGMAP
  14. + tristate "Regmap I2C"
  15. config REGMAP_SPI
  16. - tristate
  17. + select REGMAP
  18. + depends on SPI_MASTER
  19. + tristate "Regmap SPI"
  20. config REGMAP_IRQ
  21. bool
  22. --- a/drivers/base/regmap/Makefile
  23. +++ b/drivers/base/regmap/Makefile
  24. @@ -1,6 +1,8 @@
  25. -obj-$(CONFIG_REGMAP) += regmap.o regcache.o
  26. -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o
  27. -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
  28. +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-lzo.o
  29. +ifdef CONFIG_DEBUG_FS
  30. +regmap-core-objs += regmap-debugfs.o
  31. +endif
  32. +obj-$(CONFIG_REGMAP) += regmap-core.o
  33. obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
  34. obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o
  35. obj-$(CONFIG_REGMAP_IRQ) += regmap-irq.o
  36. --- a/drivers/base/regmap/regmap.c
  37. +++ b/drivers/base/regmap/regmap.c
  38. @@ -13,6 +13,7 @@
  39. #include <linux/slab.h>
  40. #include <linux/module.h>
  41. #include <linux/mutex.h>
  42. +#include <linux/module.h>
  43. #include <linux/err.h>
  44. #define CREATE_TRACE_POINTS
  45. @@ -679,3 +680,5 @@ static int __init regmap_initcall(void)
  46. return 0;
  47. }
  48. postcore_initcall(regmap_initcall);
  49. +
  50. +MODULE_LICENSE("GPL");