]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/panel: nt36672a: add backlight support
authorJoel Selvaraj <jo@jsfamily.in>
Fri, 1 Apr 2022 00:18:08 +0000 (05:48 +0530)
committerSumit Semwal <sumit.semwal@linaro.org>
Wed, 8 Jun 2022 18:06:40 +0000 (23:36 +0530)
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>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/BY5PR02MB700935F5817128CB7C3991CDD9E09@BY5PR02MB7009.namprd02.prod.outlook.com
drivers/gpu/drm/panel/panel-novatek-nt36672a.c

index 231f371901e84719a2c9014145fe0a86fa8bd9a8..6d6ce42787e2c063526c2307d907943bd398f412 100644 (file)
@@ -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;