mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add kernel 5.15 for RPI4 support
This commit is contained in:
parent
e961d478cd
commit
df88a19bbd
638 changed files with 239907 additions and 0 deletions
|
@ -0,0 +1,59 @@
|
|||
From 81dda278c29bb42ac97b0d3bcca1e55181d6c331 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Date: Tue, 21 Sep 2021 15:32:50 +0100
|
||||
Subject: [PATCH 550/634] regulator: rpi-panel: Remove get_brightness hook
|
||||
|
||||
The driver was implementing a get_brightness function that
|
||||
tried to read back the PWM setting of the display to report
|
||||
as the current brightness.
|
||||
The controller on the display does not support that, therefore
|
||||
we end up reporting a brightness of 0, and that confuses
|
||||
systemd's backlight service.
|
||||
|
||||
Remove the hook so that the framework returns the current
|
||||
brightness automatically.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
.../regulator/rpi-panel-attiny-regulator.c | 23 -------------------
|
||||
1 file changed, 23 deletions(-)
|
||||
|
||||
diff --git a/drivers/regulator/rpi-panel-attiny-regulator.c b/drivers/regulator/rpi-panel-attiny-regulator.c
|
||||
index 998233f14085..8090b9a485b5 100644
|
||||
--- a/drivers/regulator/rpi-panel-attiny-regulator.c
|
||||
+++ b/drivers/regulator/rpi-panel-attiny-regulator.c
|
||||
@@ -207,31 +207,8 @@ static int attiny_update_status(struct backlight_device *bl)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int attiny_get_brightness(struct backlight_device *bl)
|
||||
-{
|
||||
- struct attiny_lcd *state = bl_get_data(bl);
|
||||
- struct regmap *regmap = state->regmap;
|
||||
- int ret, brightness, i;
|
||||
-
|
||||
- mutex_lock(&state->lock);
|
||||
-
|
||||
- for (i = 0; i < 10; i++) {
|
||||
- ret = regmap_read(regmap, REG_PWM, &brightness);
|
||||
- if (!ret)
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- mutex_unlock(&state->lock);
|
||||
-
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- return brightness;
|
||||
-}
|
||||
-
|
||||
static const struct backlight_ops attiny_bl = {
|
||||
.update_status = attiny_update_status,
|
||||
- .get_brightness = attiny_get_brightness,
|
||||
};
|
||||
|
||||
static int attiny_gpio_get_direction(struct gpio_chip *gc, unsigned int off)
|
||||
--
|
||||
2.33.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue