Files
openwrt-armor-g5/target/linux/bcm27xx/patches-6.6/950-1072-regulator-rpi-panel-Power-off-display-on-shutdown.patch
domenico 27c9d80f51
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 12:51:15 +02:00

39 lines
1.2 KiB
Diff

From a02f1a28cf74e9593e5b2e1c18fe0cbe6cc59e42 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Thu, 25 Apr 2024 17:13:05 +0100
Subject: [PATCH 1072/1085] regulator/rpi-panel: Power off display on shutdown
Adds a shutdown function to turn off the backlight, bridge, and
touch controller on shutdown.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/regulator/rpi-panel-attiny-regulator.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/regulator/rpi-panel-attiny-regulator.c
+++ b/drivers/regulator/rpi-panel-attiny-regulator.c
@@ -370,6 +370,14 @@ static void attiny_i2c_remove(struct i2c
mutex_destroy(&state->lock);
}
+static void attiny_i2c_shutdown(struct i2c_client *client)
+{
+ struct attiny_lcd *state = i2c_get_clientdata(client);
+
+ regmap_write(state->regmap, REG_PWM, 0);
+ regmap_write(state->regmap, REG_POWERON, 0);
+}
+
static const struct of_device_id attiny_dt_ids[] = {
{ .compatible = "raspberrypi,7inch-touchscreen-panel-regulator" },
{},
@@ -384,6 +392,7 @@ static struct i2c_driver attiny_regulato
},
.probe = attiny_i2c_probe,
.remove = attiny_i2c_remove,
+ .shutdown = attiny_i2c_shutdown,
};
module_i2c_driver(attiny_regulator_driver);