[openwrt/openwrt] ath79: add MikroTik suffix to the local GPIO latch driver

LEDE Commits lede-commits at lists.infradead.org
Thu May 9 14:58:46 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e155e3bd093109744f77f884fa731e51fb2edb42

commit e155e3bd093109744f77f884fa731e51fb2edb42
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: add MikroTik suffix to the local GPIO latch driver
    
    The upcoming 6.6 kernel will introduce a new upstream generic
    "gpio-latch" driver. It will conflict with the downstream MikroTik
    GPIO latch driver. Let's rename it to avoid any potential issues.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/config-6.1                                         | 2 +-
 target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi          | 2 +-
 .../ath79/files/drivers/gpio/{gpio-latch.c => gpio-latch-mikrotik.c}  | 2 +-
 target/linux/ath79/mikrotik/config-default                            | 2 +-
 target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch               | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ath79/config-6.1 b/target/linux/ath79/config-6.1
index f2a6969aa1..87f520228f 100644
--- a/target/linux/ath79/config-6.1
+++ b/target/linux/ath79/config-6.1
@@ -81,7 +81,7 @@ CONFIG_GPIO_74X164=y
 CONFIG_GPIO_ATH79=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_GENERIC=y
-# CONFIG_GPIO_LATCH is not set
+# CONFIG_GPIO_LATCH_MIKROTIK is not set
 # CONFIG_GPIO_RB91X_KEY is not set
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
diff --git a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
index 5f9d8e42fb..0c98a6634e 100644
--- a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
@@ -22,7 +22,7 @@
 	};
 
 	gpio_latch: gpio_latch {
-		compatible = "gpio-latch";
+		compatible = "gpio-latch-mikrotik";
 		gpio-controller;
 		#gpio-cells = <2>;
 		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch.c b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
similarity index 98%
rename from target/linux/ath79/files/drivers/gpio/gpio-latch.c
rename to target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
index 5518184caa..8f53974e46 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-latch.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
@@ -15,7 +15,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
 
-#define GPIO_LATCH_DRIVER_NAME  "gpio-latch"
+#define GPIO_LATCH_DRIVER_NAME  "gpio-latch-mikrotik"
 #define GPIO_LATCH_LINES 9
 
 struct gpio_latch_chip {
diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default
index a231188c83..3fe5cd4979 100644
--- a/target/linux/ath79/mikrotik/config-default
+++ b/target/linux/ath79/mikrotik/config-default
@@ -3,7 +3,7 @@ CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_ZSTD=y
-CONFIG_GPIO_LATCH=y
+CONFIG_GPIO_LATCH_MIKROTIK=y
 CONFIG_GPIO_RB4XX=y
 CONFIG_GPIO_RB91X_KEY=y
 CONFIG_GPIO_WATCHDOG=y
diff --git a/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch b/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
index 768ab6fb49..677428fa65 100644
--- a/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
+++ b/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
@@ -33,7 +33,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  
  	  If unsure, say N.
  
-+config GPIO_LATCH
++config GPIO_LATCH_MIKROTIK
 +	tristate "MikroTik RouterBOARD GPIO latch support"
 +	depends on ATH79
 +	help
@@ -59,7 +59,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4xx.o
  obj-$(CONFIG_GPIO_JANZ_TTL)		+= gpio-janz-ttl.o
  obj-$(CONFIG_GPIO_KEMPLD)		+= gpio-kempld.o
-+obj-$(CONFIG_GPIO_LATCH)		+= gpio-latch.o
++obj-$(CONFIG_GPIO_LATCH_MIKROTIK)	+= gpio-latch-mikrotik.o
  obj-$(CONFIG_GPIO_LOGICVC)		+= gpio-logicvc.o
  obj-$(CONFIG_GPIO_LOONGSON1)		+= gpio-loongson1.o
  obj-$(CONFIG_GPIO_LOONGSON)		+= gpio-loongson.o




More information about the lede-commits mailing list