diff mbox series

[1/3] drm/panel: nt36672a: add backlight support

Message ID BY5PR02MB70099887C262C57B3A6FEC13D91F9@BY5PR02MB7009.namprd02.prod.outlook.com (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/panel: nt36672a: add backlight support | expand

Commit Message

Joel Selvaraj March 30, 2022, 6:56 a.m. UTC
Add support for backlight. This panel supports backlight control
through the QCOM WLED driver in Xiaomi Poco F1 device.

Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
---
 drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
index 231f371901e8..6d6ce42787e2 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
@@ -628,6 +628,10 @@  static int nt36672a_panel_add(struct nt36672a_panel *pinfo)
 
 	drm_panel_init(&pinfo->base, dev, &panel_funcs, DRM_MODE_CONNECTOR_DSI);
 
+	ret = drm_panel_of_backlight(&pinfo->base);
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to get backlight\n");
+
 	drm_panel_add(&pinfo->base);
 
 	return 0;