summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvyatoslav Ryhel <clamor95@gmail.com>2025-03-01 14:37:59 +0200
committerSvyatoslav Ryhel <clamor95@gmail.com>2025-03-13 19:13:18 +0200
commit467f9275e73913e01b5e3813350c2caed468e462 (patch)
treea1ff37481c3da49052d76ca64f932f793af2619b
parentbf2753796fd37659580983e4efd2963aa15786e5 (diff)
video: endeavoru-panel: move backlight request after probe
Due to the use of the Tegra DC backlight feature by the HTC ONE X, backlight requests MUST NOT be made during probe or earlier. This is because it creates a loop, as the backlight is a DC child. To mitigate this issue, backlight requests can be made later, once the backlight is actively used. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
-rw-r--r--drivers/video/endeavoru-panel.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/video/endeavoru-panel.c b/drivers/video/endeavoru-panel.c
index d4ba4d8b6da..90f838ecc20 100644
--- a/drivers/video/endeavoru-panel.c
+++ b/drivers/video/endeavoru-panel.c
@@ -117,6 +117,18 @@ static int endeavoru_panel_set_backlight(struct udevice *dev, int percent)
struct endeavoru_panel_priv *priv = dev_get_priv(dev);
int ret;
+ /*
+ * Due to the use of the Tegra DC backlight feature, backlight
+ * requests MUST NOT be made during probe or earlier. This is
+ * because it creates a loop, as the backlight is a DC child.
+ */
+ ret = uclass_get_device_by_phandle(UCLASS_PANEL_BACKLIGHT, dev,
+ "backlight", &priv->backlight);
+ if (ret) {
+ log_err("cannot get backlight: ret = %d\n", ret);
+ return ret;
+ }
+
ret = backlight_enable(priv->backlight);
if (ret)
return ret;
@@ -136,13 +148,6 @@ static int endeavoru_panel_of_to_plat(struct udevice *dev)
struct endeavoru_panel_priv *priv = dev_get_priv(dev);
int ret;
- ret = uclass_get_device_by_phandle(UCLASS_PANEL_BACKLIGHT, dev,
- "backlight", &priv->backlight);
- if (ret) {
- log_err("cannot get backlight: ret = %d\n", ret);
- return ret;
- }
-
ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev,
"vdd-supply", &priv->vdd);
if (ret) {