mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add RPI kernel 6.6 support
This commit is contained in:
parent
98cad48e0e
commit
12de1d2995
1001 changed files with 321080 additions and 0 deletions
|
@ -0,0 +1,40 @@
|
|||
From 7e92f2bdf04811093aa212caa0ee8b45bb5a7be6 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Wed, 8 Sep 2021 14:21:38 +0100
|
||||
Subject: [PATCH 0300/1002] drm/panel/raspberrypi-touchscreen: Handle I2C
|
||||
errors.
|
||||
|
||||
rpi_touchscreen_i2c_read returns any errors from i2c_transfer,
|
||||
or the 8 bit received value.
|
||||
Check for error values before trying to process the data as
|
||||
valid.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
|
||||
index dae2ec2acd1f..12f6961c9268 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
|
||||
@@ -295,13 +295,14 @@ static int rpi_touchscreen_noop(struct drm_panel *panel)
|
||||
static int rpi_touchscreen_prepare(struct drm_panel *panel)
|
||||
{
|
||||
struct rpi_touchscreen *ts = panel_to_ts(panel);
|
||||
- int i;
|
||||
+ int i, data;
|
||||
|
||||
rpi_touchscreen_i2c_write(ts, REG_POWERON, 1);
|
||||
usleep_range(20000, 25000);
|
||||
/* Wait for nPWRDWN to go low to indicate poweron is done. */
|
||||
for (i = 0; i < 100; i++) {
|
||||
- if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1)
|
||||
+ data = rpi_touchscreen_i2c_read(ts, REG_PORTB);
|
||||
+ if (data >= 0 && (data & 1))
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue