mirror of
https://github.com/armbian/build.git
synced 2025-08-15 23:56:57 +02:00
* The initial state of a series of patches for sunxi-5.17 tag orange-pi-5.17-20220323-1423 * DEBUG for sunxi-5.17 * Add Armbian patches to 5.17 * Fix duplicate nodes for sun50i-h5-orangepi-pc2 * Fix reg_ahci_5v to status okay for bananapro board * Remove an unused patch for an unsupported sun50i-h6-tanix-tx6 board
54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
From 4cd3283892e4cec986551e3c60e34699139dd5b9 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
|
Date: Sat, 22 Jan 2022 01:56:54 +0100
|
|
Subject: [PATCH 401/456] input: kb151: Allow to disable the keyboard input
|
|
processing
|
|
|
|
This allows the user to add kb151.disable_input to kernel boot
|
|
arguments (or module parameters), and they'll be able to use
|
|
the ppkb-i2c-inputd with their keyboard.
|
|
|
|
Charger part remains handled by the kernel.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
drivers/input/keyboard/kb151.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/drivers/input/keyboard/kb151.c b/drivers/input/keyboard/kb151.c
|
|
index 898a25d06ed6..491c01dfd194 100644
|
|
--- a/drivers/input/keyboard/kb151.c
|
|
+++ b/drivers/input/keyboard/kb151.c
|
|
@@ -82,6 +82,10 @@
|
|
#define DEFAULT_MAP_ROWS 12
|
|
#define DEFAULT_MAP_COLS 12
|
|
|
|
+static bool disable_input;
|
|
+module_param(disable_input, bool, S_IRUGO);
|
|
+MODULE_PARM_DESC(disable_input, "Disable the keyboard part of the driver");
|
|
+
|
|
static const u32 kb151_default_keymap[] = {
|
|
MATRIX_KEY(0, 0, KEY_ESC),
|
|
MATRIX_KEY(0, 1, KEY_1),
|
|
@@ -492,6 +496,9 @@ static int kb151_probe(struct i2c_client *client)
|
|
kb151->rows = kb_rows;
|
|
kb151->cols = kb_cols;
|
|
|
|
+ if (disable_input)
|
|
+ goto charger;
|
|
+
|
|
kb151->input = devm_input_allocate_device(dev);
|
|
if (!kb151->input)
|
|
return -ENOMEM;
|
|
@@ -523,6 +530,7 @@ static int kb151_probe(struct i2c_client *client)
|
|
if (ret)
|
|
return dev_err_probe(dev, ret, "Failed to register input\n");
|
|
|
|
+charger:
|
|
#ifdef CONFIG_IP5XXX_POWER
|
|
// we need to create a custom regmap_bus that will proxy
|
|
// charger register reads/writes via a keyboard MCU
|
|
--
|
|
2.34.1
|
|
|