mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 09:10:02 +00:00
openwrt-22.03.0: mt1300 support button switch
This commit is contained in:
parent
ae6c5a0265
commit
69702b557d
@ -0,0 +1,38 @@
|
||||
From 7931af1009601f514f44d17f8e288446bc5042f6 Mon Sep 17 00:00:00 2001
|
||||
From: gl-dengxinfa <xinfa.deng@gl-inet.com>
|
||||
Date: Mon, 10 Oct 2022 11:22:41 +0800
|
||||
Subject: [PATCH] fix: switch button execute /etc/rc.button/switch
|
||||
|
||||
---
|
||||
package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 1 +
|
||||
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
index 2b39ec8f3b..f3f0ad3172 100644
|
||||
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
@@ -100,6 +100,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/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
||||
index b6b9396661..c488d72e36 100644
|
||||
--- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
||||
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
||||
@@ -55,7 +55,7 @@
|
||||
switch {
|
||||
label = "switch";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
- linux,code = <BTN_0>;
|
||||
+ linux,code = <KEY_SETUP>;
|
||||
linux,input-type = <EV_SW>;
|
||||
};
|
||||
};
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user