armbian-build/patch/kernel/archive/sunxi-5.10/megous/misc-modem-power-Hog-CTS-RTS-so-that-userspace-can-t.patch
The-going 7964a578f5
Patches megous 5.10 (#3293)
* Add a series of patches for sunxi 5.10

Patches from the repository
https://github.com/megous/linux branches of orange-pi-5.10

* Patches adapted to the kernel version v5.10.81

* Remove unnecessary patches 5.10.19-5.10.75

* Kernel switch tag=v5.10.81 for the current sunxi

* Adjust broken patches, build tested on sunxi and sunxi64

* Remove patch added by mistake

Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
2021-11-27 00:48:30 +01:00

41 lines
1.2 KiB
Diff

From 69eed340ee4b96f39dce24502da9761923a74f17 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Tue, 8 Sep 2020 11:43:21 +0200
Subject: [PATCH 181/351] misc: modem-power: Hog CTS/RTS so that userspace
can't mess with them
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
drivers/misc/modem-power.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/misc/modem-power.c b/drivers/misc/modem-power.c
index 65ec69c7a361..7cb152e8969c 100644
--- a/drivers/misc/modem-power.c
+++ b/drivers/misc/modem-power.c
@@ -132,6 +132,8 @@ struct mpwr_dev {
struct gpio_desc *sleep_gpio;
struct gpio_desc *dtr_gpio;
struct gpio_desc *host_ready_gpio;
+ struct gpio_desc *cts_gpio;
+ struct gpio_desc *rts_gpio;
/* inputs */
struct gpio_desc *status_gpio;
@@ -850,9 +852,12 @@ static const struct mpwr_gpio mpwr_eg25_gpios[] = {
MPWR_GPIO_DEF(status, GPIOD_IN, false),
MPWR_GPIO_DEF_IRQ(wakeup, GPIOD_IN, true,
IRQF_TRIGGER_FALLING),
+
// XXX: not really needed...
MPWR_GPIO_DEF(sleep, GPIOD_OUT_LOW, false),
MPWR_GPIO_DEF(host_ready, GPIOD_OUT_HIGH, false),
+ MPWR_GPIO_DEF(cts, GPIOD_IN, false),
+ MPWR_GPIO_DEF(rts, GPIOD_OUT_LOW, false),
{ },
};
--
2.34.0