siflower: fix switch button hotplug

This commit is contained in:
gl-dengxinfa 2022-11-15 09:30:31 +08:00
parent 15185686e0
commit fc2f2fd28c
2 changed files with 13 additions and 13 deletions

View File

@ -1,21 +1,21 @@
From 0ce1fdf1cb217327aace4bcc090a81248ed19940 Mon Sep 17 00:00:00 2001
From 09c603fb217deada0bf50b1e08d3bc88860645c1 Mon Sep 17 00:00:00 2001
From: gl-dengxinfa <xinfa.deng@gl-inet.com>
Date: Mon, 14 Nov 2022 15:31:45 +0800
Date: Mon, 14 Nov 2022 19:48:28 +0800
Subject: [PATCH] fix: switch button execute etc rc.button switch
---
.../package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 1 +
openwrt-18.06/package/kernel/button-hotplug/src/button-hotplug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/openwrt-18.06/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/openwrt-18.06/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 1aef23e87..52c280755 100644
--- a/openwrt-18.06/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/openwrt-18.06/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -106,6 +106,7 @@ static struct bh_map button_map[] = {
BH_MAP(KEY_WIMAX, "wwan"),
BH_MAP(KEY_WLAN, "wlan"),
BH_MAP(KEY_WPS_BUTTON, "wps"),
+ BH_MAP(KEY_SETUP, "switch"),
diff --git a/openwrt-18.06/package/kernel/button-hotplug/src/button-hotplug.c b/openwrt-18.06/package/kernel/button-hotplug/src/button-hotplug.c
index 5294a9700..e038702cc 100644
--- a/openwrt-18.06/package/kernel/button-hotplug/src/button-hotplug.c
+++ b/openwrt-18.06/package/kernel/button-hotplug/src/button-hotplug.c
@@ -88,6 +88,7 @@ static struct bh_map button_map[] = {
BH_MAP(KEY_RFKILL, "rfkill"),
BH_MAP(KEY_WPS_BUTTON, "wps"),
BH_MAP(KEY_WIMAX, "wwan"),
+ BH_MAP(KEY_SETUP, "switch"),
};
/* -------------------------------------------------------------------------*/

View File

@ -61,7 +61,7 @@ index 0eaa1ce37..9608336c4 100644
- label = "BTN_0";
- linux,code = <0x100>; //BTN_0
+ label = "switch";
+ linux,code = <KEY_SETUP>;
+ linux,code = <141>;
gpios = <&gpio 1 1>;
poll-interval = <10>;
debounce-interval = <20>;