kernel: add support for kernel 5.4
[openwrt/openwrt.git] / target / linux / generic / hack-5.4 / 259-regmap_dynamic.patch
index ec4636dbeec007e7feacacecd2b87c8cd8817bd7..9950f156d36a8c7b23fb533e0f9374d090ccfff9 100644 (file)
@@ -18,14 +18,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  # subsystems should select the appropriate symbols.
  
  config REGMAP
  # subsystems should select the appropriate symbols.
  
  config REGMAP
--      default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ)
+-      default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SCCB || REGMAP_I3C)
        select IRQ_DOMAIN if REGMAP_IRQ
 -      bool
 +      tristate
  
  config REGCACHE_COMPRESSED
        select LZO_COMPRESS
        select IRQ_DOMAIN if REGMAP_IRQ
 -      bool
 +      tristate
  
  config REGCACHE_COMPRESSED
        select LZO_COMPRESS
-@@ -18,6 +17,7 @@ config REGMAP_AC97
+@@ -18,38 +17,49 @@ config REGMAP_AC97
  
  config REGMAP_I2C
        tristate
  
  config REGMAP_I2C
        tristate
@@ -33,7 +33,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on I2C
  
  config REGMAP_SLIMBUS
        depends on I2C
  
  config REGMAP_SLIMBUS
-@@ -26,20 +26,26 @@ config REGMAP_SLIMBUS
+       tristate
++      select REGMAP
+       depends on SLIMBUS
  
  config REGMAP_SPI
        tristate
  
  config REGMAP_SPI
        tristate
@@ -42,13 +44,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        depends on SPI
  
  config REGMAP_SPMI
        depends on SPI
  
  config REGMAP_SPMI
-+      select REGMAP
        tristate
        tristate
++      select REGMAP
        depends on SPMI
  
  config REGMAP_W1
        depends on SPMI
  
  config REGMAP_W1
-+      select REGMAP
        tristate
        tristate
++      select REGMAP
        depends on W1
  
  config REGMAP_MMIO
        depends on W1
  
  config REGMAP_MMIO
@@ -56,10 +58,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      select REGMAP
  
  config REGMAP_IRQ
 +      select REGMAP
  
  config REGMAP_IRQ
-+      select REGMAP
        bool
        bool
++      select REGMAP
  
  config REGMAP_SOUNDWIRE
  
  config REGMAP_SOUNDWIRE
+       tristate
++      select REGMAP
+       depends on SOUNDWIRE
+ config REGMAP_SCCB
+       tristate
++      select REGMAP
+       depends on I2C
+ config REGMAP_I3C
+       tristate
++      select REGMAP
+       depends on I3C
 --- a/drivers/base/regmap/Makefile
 +++ b/drivers/base/regmap/Makefile
 @@ -2,10 +2,14 @@
 --- a/drivers/base/regmap/Makefile
 +++ b/drivers/base/regmap/Makefile
 @@ -2,10 +2,14 @@
@@ -83,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  obj-$(CONFIG_REGMAP_SLIMBUS) += regmap-slimbus.o
 --- a/drivers/base/regmap/regmap.c
 +++ b/drivers/base/regmap/regmap.c
  obj-$(CONFIG_REGMAP_SLIMBUS) += regmap-slimbus.o
 --- a/drivers/base/regmap/regmap.c
 +++ b/drivers/base/regmap/regmap.c
-@@ -13,6 +13,7 @@
+@@ -9,6 +9,7 @@
  #include <linux/device.h>
  #include <linux/slab.h>
  #include <linux/export.h>
  #include <linux/device.h>
  #include <linux/slab.h>
  #include <linux/export.h>
@@ -91,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/of.h>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/of.h>
-@@ -3039,3 +3040,5 @@ static int __init regmap_initcall(void)
+@@ -3124,3 +3125,5 @@ static int __init regmap_initcall(void)
        return 0;
  }
  postcore_initcall(regmap_initcall);
        return 0;
  }
  postcore_initcall(regmap_initcall);
@@ -99,7 +114,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +MODULE_LICENSE("GPL");
 --- a/include/linux/regmap.h
 +++ b/include/linux/regmap.h
 +MODULE_LICENSE("GPL");
 --- a/include/linux/regmap.h
 +++ b/include/linux/regmap.h
-@@ -187,7 +187,7 @@ struct reg_sequence {
+@@ -185,7 +185,7 @@ struct reg_sequence {
        pollret ?: ((cond) ? 0 : -ETIMEDOUT); \
  })
  
        pollret ?: ((cond) ? 0 : -ETIMEDOUT); \
  })