mirror of
https://github.com/armbian/build.git
synced 2025-08-10 21:26:59 +02:00
* Rework patches for sunxi 5.15.4 * Rework patches sunxi for 5.15.5 * Kernel switch tag=v5.15.5 for sunxi EDGE * Temporarily disabled, requires rework. drivers/clk/sunxi-ng/sun8i-de33.c: In function ‘sunxi_de33_clk_probe’: drivers/clk/sunxi-ng/sun8i-de33.c:155:8: error: implicit declaration of function ‘sunxi_ccu_probe’; did you mean ‘of_sunxi_ccu_probe’? [-Werror=implicit-function-declarati> ret = sunxi_ccu_probe(pdev->dev.of_node, reg, ccu_desc); ^~~~~~~~~~~~~~~ of_sunxi_ccu_probe cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:277: drivers/clk/sunxi-ng/sun8i-de33.o] Error 1 make[2]: *** [scripts/Makefile.build:540: drivers/clk/sunxi-ng] Error 2 * Correct the comment.
72 lines
2.0 KiB
Diff
72 lines
2.0 KiB
Diff
From ca3d21421100cb85a5d98b1c08aa9fa78c91ec95 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megous@megous.com>
|
|
Date: Thu, 3 Dec 2020 20:00:41 +0100
|
|
Subject: [PATCH 277/467] misc: modem-power: GPIO debugging API
|
|
|
|
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|
---
|
|
drivers/misc/modem-power.c | 34 ++++++++++++++++++++++++++++++++++
|
|
1 file changed, 34 insertions(+)
|
|
|
|
diff --git a/drivers/misc/modem-power.c b/drivers/misc/modem-power.c
|
|
index 91d2bfdd1..0a5f37eb4 100644
|
|
--- a/drivers/misc/modem-power.c
|
|
+++ b/drivers/misc/modem-power.c
|
|
@@ -1300,12 +1300,45 @@ static ssize_t hard_reset_store(struct device *dev,
|
|
return len;
|
|
}
|
|
|
|
+static ssize_t debug_pins_store(struct device *dev,
|
|
+ struct device_attribute *attr,
|
|
+ const char *buf, size_t len)
|
|
+{
|
|
+ struct mpwr_dev *mpwr = platform_get_drvdata(to_platform_device(dev));
|
|
+ unsigned val;
|
|
+ int ret;
|
|
+
|
|
+ if (test_bit(MPWR_F_BLOCKED, mpwr->flags))
|
|
+ return -EPERM;
|
|
+
|
|
+ ret = kstrtouint(buf, 16, &val);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+
|
|
+ gpiod_direction_output(mpwr->host_ready_gpio, val & BIT(0));
|
|
+ gpiod_direction_output(mpwr->enable_gpio, val & BIT(1));
|
|
+ gpiod_direction_output(mpwr->dtr_gpio, val & BIT(2));
|
|
+ gpiod_direction_output(mpwr->rts_gpio, val & BIT(3));
|
|
+
|
|
+ return len;
|
|
+}
|
|
+
|
|
+static ssize_t debug_pins_show(struct device *dev,
|
|
+ struct device_attribute *attr, char *buf)
|
|
+{
|
|
+ struct mpwr_dev *mpwr = platform_get_drvdata(to_platform_device(dev));
|
|
+
|
|
+ return scnprintf(buf, PAGE_SIZE, "CTS=%u RI=%u\n",
|
|
+ gpiod_get_value(mpwr->cts_gpio), gpiod_get_value(mpwr->wakeup_gpio));
|
|
+}
|
|
+
|
|
static DEVICE_ATTR_RW(powered);
|
|
static DEVICE_ATTR_WO(powered_blocking);
|
|
static DEVICE_ATTR_RO(killswitched);
|
|
static DEVICE_ATTR_RO(is_busy);
|
|
static DEVICE_ATTR_RO(help);
|
|
static DEVICE_ATTR_WO(hard_reset);
|
|
+static DEVICE_ATTR_RW(debug_pins);
|
|
|
|
static struct attribute *mpwr_attrs[] = {
|
|
&dev_attr_powered.attr,
|
|
@@ -1314,6 +1347,7 @@ static struct attribute *mpwr_attrs[] = {
|
|
&dev_attr_is_busy.attr,
|
|
&dev_attr_help.attr,
|
|
&dev_attr_hard_reset.attr,
|
|
+ &dev_attr_debug_pins.attr,
|
|
NULL,
|
|
};
|
|
|
|
--
|
|
2.34.0
|
|
|