diff options
author | Dave Stevenson <dave.stevenson@raspberrypi.com> | 2022-01-25 01:01:27 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-01-28 23:55:51 +0300 |
commit | 1d746d448f421094a71ba634399d2ee61669513f (patch) | |
tree | a3cae6004d335eee9d4cbf72e42186161d242436 /drivers/regulator | |
parent | 8c518eb4039102445b1b7bd6626aba0fef65b753 (diff) | |
download | linux-1d746d448f421094a71ba634399d2ee61669513f.tar.xz |
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>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Link: https://lore.kernel.org/r/20220124220129.158891-8-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/rpi-panel-attiny-regulator.c | 23 |
1 files changed, 0 insertions, 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) |