mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
8c405cdccc
The patches were generated from the RPi repo with the following command: git format-patch v6.6.34..rpi-6.1.y Some patches needed rebasing and, as usual, the applied and reverted, wireless drivers, Github workflows, READMEs and defconfigs patches were removed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
From 16c9c73f91896fdd22b6821ae08e121d01da4aad Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Mon, 29 Nov 2021 18:31:37 +0000
|
|
Subject: [PATCH 0322/1085] regulator/rpi-panel-attiny: Don't read the LCD
|
|
power status
|
|
|
|
The I2C to the Atmel is very fussy, and locks up easily on
|
|
Pi0-3 particularly on reads.
|
|
|
|
The LCD power status is controlled solely by this driver, so
|
|
rather than reading it back from the Atmel, use the cached
|
|
status last set.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/regulator/rpi-panel-attiny-regulator.c | 18 +-----------------
|
|
1 file changed, 1 insertion(+), 17 deletions(-)
|
|
|
|
--- a/drivers/regulator/rpi-panel-attiny-regulator.c
|
|
+++ b/drivers/regulator/rpi-panel-attiny-regulator.c
|
|
@@ -143,24 +143,8 @@ static int attiny_lcd_power_disable(stru
|
|
static int attiny_lcd_power_is_enabled(struct regulator_dev *rdev)
|
|
{
|
|
struct attiny_lcd *state = rdev_get_drvdata(rdev);
|
|
- unsigned int data;
|
|
- int ret, i;
|
|
|
|
- mutex_lock(&state->lock);
|
|
-
|
|
- for (i = 0; i < 10; i++) {
|
|
- ret = regmap_read(rdev->regmap, REG_PORTC, &data);
|
|
- if (!ret)
|
|
- break;
|
|
- usleep_range(10000, 12000);
|
|
- }
|
|
-
|
|
- mutex_unlock(&state->lock);
|
|
-
|
|
- if (ret < 0)
|
|
- return ret;
|
|
-
|
|
- return data & PC_RST_BRIDGE_N;
|
|
+ return state->port_states[REG_PORTC - REG_PORTA] & PC_RST_BRIDGE_N;
|
|
}
|
|
|
|
static const struct regulator_init_data attiny_regulator_default = {
|