mirror of
https://github.com/armbian/build.git
synced 2025-08-09 12:46:58 +02:00
* sunxi-6.0: update upstream megous patches to tag orange-pi-6.0-20221105-1830 * sunxi-6.0: rebase to v6.0.8 * sunxi-6.0: switch to v6.0.8
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From 27ba277c1f13820453dfae882d407a285d634fbc Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Sat, 29 Oct 2022 00:45:55 +0200
|
|
Subject: [PATCH 492/492] input: pinephone-keyboard: Allow to disable Fn layer
|
|
processing
|
|
|
|
Sometimes it's more flexible to handle Fn key as additional modifier
|
|
that can be configured from userspace.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
drivers/input/keyboard/pinephone-keyboard.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
|
|
index d74ae97ed3cf..671642857d0c 100644
|
|
--- a/drivers/input/keyboard/pinephone-keyboard.c
|
|
+++ b/drivers/input/keyboard/pinephone-keyboard.c
|
|
@@ -14,6 +14,10 @@ static bool disable_input;
|
|
module_param(disable_input, bool, S_IRUGO);
|
|
MODULE_PARM_DESC(disable_input, "Disable the keyboard part of the driver");
|
|
|
|
+static bool disable_fn;
|
|
+module_param(disable_fn, bool, S_IRUGO);
|
|
+MODULE_PARM_DESC(disable_fn, "Disable the FN layer special handling");
|
|
+
|
|
#define DRV_NAME "pinephone-keyboard"
|
|
|
|
#define PPKB_CRC8_POLYNOMIAL 0x07
|
|
@@ -276,7 +280,8 @@ static void ppkb_update(struct i2c_client *client)
|
|
|
|
dev_dbg(dev, "row %u col %u %sed\n",
|
|
row, col, value ? "press" : "releas");
|
|
- if (keymap[code] == KEY_FN) {
|
|
+
|
|
+ if (!disable_fn && keymap[code] == KEY_FN) {
|
|
dev_dbg(dev, "FN is now %sed\n",
|
|
value ? "press" : "releas");
|
|
keymap = value ? ppkb->fn_keymap
|
|
--
|
|
2.35.3
|
|
|