mirror of
https://github.com/armbian/build.git
synced 2025-08-09 12:46:58 +02:00
* sunxi-6.0: initial state: add megous patches to series * sunxi-6.0: Switch to v6.0.1 * wifi: Limit the version 6.0 for Realtek 88x2cs chipsets * Adjust kernel configs * Remove not needed patches * Adjust broken patches Co-authored-by: Igor <igor@armbian.com>
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From 417ff3a5d9241ac99aa215866843eda414944969 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Sun, 3 Apr 2022 16:25:59 +0200
|
|
Subject: [PATCH 370/486] 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 | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/drivers/input/keyboard/pinephone-keyboard.c b/drivers/input/keyboard/pinephone-keyboard.c
|
|
index b1e951cbb..d74ae97ed 100644
|
|
--- a/drivers/input/keyboard/pinephone-keyboard.c
|
|
+++ b/drivers/input/keyboard/pinephone-keyboard.c
|
|
@@ -10,6 +10,10 @@
|
|
#include <linux/module.h>
|
|
#include <linux/regulator/consumer.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
|
|
@@ -397,6 +401,9 @@ static int ppkb_probe(struct i2c_client *client)
|
|
ppkb->rows = map_rows;
|
|
ppkb->cols = map_cols;
|
|
|
|
+ if (disable_input)
|
|
+ goto enable_regulator;
|
|
+
|
|
ppkb->input = devm_input_allocate_device(dev);
|
|
if (!ppkb->input)
|
|
return -ENOMEM;
|
|
@@ -433,6 +440,7 @@ static int ppkb_probe(struct i2c_client *client)
|
|
if (ret)
|
|
return dev_err_probe(dev, ret, "Failed to request IRQ\n");
|
|
|
|
+enable_regulator:
|
|
ret = regulator_enable(ppkb->vbat_supply);
|
|
if (ret)
|
|
return dev_err_probe(dev, ret,
|
|
--
|
|
2.35.3
|
|
|