mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From 2a6c3115f4142e23ca10c984d7f65ac8fb901cc2 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Wed, 8 Nov 2023 15:50:39 +0000
|
|
Subject: [PATCH] input: edt-ft5x06: Include I2C details in names for the
|
|
devices
|
|
|
|
libinput uses the input device name alone. If you have two
|
|
identical input devices, then there is no way to differentiate
|
|
between them, and in the case of touchscreens that means no
|
|
way to associate them with the appropriate display device.
|
|
|
|
Add the I2C bus and address to the start of the input device
|
|
name so that the name is always unique within the system.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/input/touchscreen/edt-ft5x06.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/input/touchscreen/edt-ft5x06.c
|
|
+++ b/drivers/input/touchscreen/edt-ft5x06.c
|
|
@@ -67,6 +67,7 @@
|
|
#define TOUCH_EVENT_RESERVED 0x03
|
|
|
|
#define EDT_NAME_LEN 23
|
|
+#define EDT_NAME_PREFIX_LEN 8
|
|
#define EDT_SWITCH_MODE_RETRIES 10
|
|
#define EDT_SWITCH_MODE_DELAY 5 /* msec */
|
|
#define EDT_RAW_DATA_RETRIES 100
|
|
@@ -134,7 +135,7 @@ struct edt_ft5x06_ts_data {
|
|
int max_support_points;
|
|
unsigned int known_ids;
|
|
|
|
- char name[EDT_NAME_LEN];
|
|
+ char name[EDT_NAME_PREFIX_LEN + EDT_NAME_LEN];
|
|
char fw_version[EDT_NAME_LEN];
|
|
int init_td_status;
|
|
|
|
@@ -965,6 +966,9 @@ static int edt_ft5x06_ts_identify(struct
|
|
char *model_name = tsdata->name;
|
|
char *fw_version = tsdata->fw_version;
|
|
|
|
+ snprintf(model_name, EDT_NAME_PREFIX_LEN, "%s ", dev_name(&client->dev));
|
|
+ model_name += strlen(model_name);
|
|
+
|
|
/* see what we find if we assume it is a M06 *
|
|
* if we get less than EDT_NAME_LEN, we don't want
|
|
* to have garbage in there
|