mirror of
https://github.com/armbian/build.git
synced 2025-08-11 13:46:58 +02:00
* sunxi-5.18: initial state: add patches megous * sunxi-5.18: Adapt patches for error-free application * remove unused patches * Add the ability to compile sunxi-5.18
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From f233c899e40180c5ea82b79a9adec9ad9f954494 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Sun, 3 Apr 2022 16:25:59 +0200
|
|
Subject: [PATCH 381/515] 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 b1e951cbb925..d74ae97ed3cf 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
|
|
|