mirror of
https://github.com/armbian/build.git
synced 2025-08-12 14:16:57 +02:00
* Recycling of megous v5.16.4 patches The patches were sorted as far as possible. Some patches are renamed according to their place of application. The length of the patch name has been changed to improve readability using the `git format-patch --filename-max-length=75` method. The folder containing the patches will have the name `patches.name` and the corresponding file `series.name` for the convenience of processing and moving them upstream. But the control file remains `series.conf`. Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Add a series of armbian patches for 5.16 Signed-off-by: The-going <48602507+The-going@users.noreply.github.com> * Remove patches whose fixes are already in the kernel Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
76 lines
2.1 KiB
Diff
76 lines
2.1 KiB
Diff
From 0750a9ae7e6881a952c2a8a41a19a0982d23be27 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megous@megous.com>
|
|
Date: Mon, 22 Jun 2020 17:17:09 +0200
|
|
Subject: [PATCH 071/446] input: touchscreen: goodix: Add config debugfs file
|
|
|
|
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|
---
|
|
drivers/input/touchscreen/goodix.c | 17 +++++++++++++++++
|
|
drivers/input/touchscreen/goodix.h | 1 +
|
|
2 files changed, 18 insertions(+)
|
|
|
|
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
|
|
index aaa3c455e..e02fdcfed 100644
|
|
--- a/drivers/input/touchscreen/goodix.c
|
|
+++ b/drivers/input/touchscreen/goodix.c
|
|
@@ -21,6 +21,7 @@
|
|
#include <linux/slab.h>
|
|
#include <linux/acpi.h>
|
|
#include <linux/of.h>
|
|
+#include <linux/debugfs.h>
|
|
#include <asm/unaligned.h>
|
|
#include "goodix.h"
|
|
|
|
@@ -909,6 +910,16 @@ static int goodix_get_gpio_config(struct goodix_ts_data *ts)
|
|
return 0;
|
|
}
|
|
|
|
+static int ts_config_bin_show(struct seq_file *s, void *data)
|
|
+{
|
|
+ struct goodix_ts_data *ts = s->private;
|
|
+
|
|
+ seq_write(s, ts->config, ts->chip->config_len);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+DEFINE_SHOW_ATTRIBUTE(ts_config_bin);
|
|
+
|
|
/**
|
|
* goodix_read_config - Read the embedded configuration of the panel
|
|
*
|
|
@@ -947,6 +958,10 @@ static void goodix_read_config(struct goodix_ts_data *ts)
|
|
}
|
|
|
|
ts->chip->calc_config_checksum(ts);
|
|
+
|
|
+ ts->debug_root = debugfs_create_dir("goodix", NULL);
|
|
+ debugfs_create_file("config.bin", 0444, ts->debug_root, ts,
|
|
+ &ts_config_bin_fops);
|
|
}
|
|
|
|
/**
|
|
@@ -1270,6 +1285,8 @@ static int goodix_ts_remove(struct i2c_client *client)
|
|
if (ts->load_cfg_from_disk)
|
|
wait_for_completion(&ts->firmware_loading_complete);
|
|
|
|
+ debugfs_remove(ts->debug_root);
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/drivers/input/touchscreen/goodix.h b/drivers/input/touchscreen/goodix.h
|
|
index 02065d1c3..2988bb09a 100644
|
|
--- a/drivers/input/touchscreen/goodix.h
|
|
+++ b/drivers/input/touchscreen/goodix.h
|
|
@@ -102,6 +102,7 @@ struct goodix_ts_data {
|
|
u8 main_clk[GOODIX_MAIN_CLK_LEN];
|
|
int bak_ref_len;
|
|
u8 *bak_ref;
|
|
+ struct dentry *debug_root;
|
|
};
|
|
|
|
int goodix_i2c_read(struct i2c_client *client, u16 reg, u8 *buf, int len);
|
|
--
|
|
2.31.1
|
|
|