42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
|
From a14db2922d1f6e31ebe73b572527bf52cad20d0a Mon Sep 17 00:00:00 2001
|
||
|
From: Ondrej Jirman <megi@xff.cz>
|
||
|
Date: Wed, 22 Jun 2022 01:05:43 +0200
|
||
|
Subject: [PATCH 380/464] input: pinephone-keyboard: Allow disabling the
|
||
|
keyboard input
|
||
|
|
||
|
This is useful when the user wants to use a userspace implementation.
|
||
|
|
||
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||
|
---
|
||
|
drivers/input/keyboard/pinephone-keyboard.c | 7 +++++++
|
||
|
1 file changed, 7 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
|
||
|
index 038ff3549a7a..557ead132450 100644
|
||
|
--- a/drivers/input/keyboard/pinephone-keyboard.c
|
||
|
+++ b/drivers/input/keyboard/pinephone-keyboard.c
|
||
|
@@ -15,6 +15,10 @@
|
||
|
#include <linux/regulator/consumer.h>
|
||
|
#include <linux/types.h>
|
||
|
|
||
|
+static bool disable_input;
|
||
|
+module_param(disable_input, bool, S_IRUGO);
|
||
|
+MODULE_PARM_DESC(disable_input, "Disable the keyboard part of the driver");
|
||
|
+
|
||
|
#define DRV_NAME "pinephone-keyboard"
|
||
|
|
||
|
#define PPKB_CRC8_POLYNOMIAL 0x07
|
||
|
@@ -406,6 +410,9 @@ static int ppkb_probe(struct i2c_client *client)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+ if (disable_input)
|
||
|
+ return 0;
|
||
|
+
|
||
|
crc8_populate_msb(ppkb->crc_table, PPKB_CRC8_POLYNOMIAL);
|
||
|
|
||
|
ppkb->input = devm_input_allocate_device(dev);
|
||
|
--
|
||
|
2.34.1
|
||
|
|