disp: msm: dsi: Add "bl_ctrl_dummy" to panel bl type

Add a new display's backlight type "bl_ctrl_dummy". With this
backlight type, the panel backlight driver will ignore any backlight
requests. This new backlight type will be used with a bare_board or
no-display configuration and the display driver doesn't need to have
any communication with panel.

Port from: (CR).

Change-Id: I1b0c2759deaa4b0808fd4f0503943a191842235e
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697250
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shuo Yan <shuoyan@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Bang Nguyen 2019-07-24 14:31:35 -05:00 • committed by tongkun1
commit 0fc8989fbd
2 changed files with 10 additions and 0 deletions

View file

@ -645,6 +645,9 @@ int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl)
case DSI_BACKLIGHT_DCS:
rc = dsi_panel_update_backlight(panel, bl_lvl);
break;
case DSI_BACKLIGHT_DUMMY:
rc = 0;
break;
case DSI_BACKLIGHT_EXTERNAL:
break;
case DSI_BACKLIGHT_PWM:
@ -732,6 +735,8 @@ static int dsi_panel_bl_register(struct dsi_panel *panel)
break;
case DSI_BACKLIGHT_DCS:
break;
case DSI_BACKLIGHT_DUMMY:
break;
case DSI_BACKLIGHT_EXTERNAL:
break;
case DSI_BACKLIGHT_PWM:
@ -767,6 +772,8 @@ static int dsi_panel_bl_unregister(struct dsi_panel *panel)
break;
case DSI_BACKLIGHT_DCS:
break;
case DSI_BACKLIGHT_DUMMY:
break;
case DSI_BACKLIGHT_EXTERNAL:
break;
case DSI_BACKLIGHT_PWM:
@ -2403,6 +2410,8 @@ static int dsi_panel_parse_bl_config(struct dsi_panel *panel)
panel->bl_config.type = DSI_BACKLIGHT_WLED;
} else if (!strcmp(bl_type, "bl_ctrl_dcs")) {
panel->bl_config.type = DSI_BACKLIGHT_DCS;
} else if (!strcmp(bl_type, "bl_ctrl_dummy")) {
panel->bl_config.type = DSI_BACKLIGHT_DUMMY;
} else if (!strcmp(bl_type, "bl_ctrl_external")) {
panel->bl_config.type = DSI_BACKLIGHT_EXTERNAL;
} else {

View file

@ -48,6 +48,7 @@ enum dsi_backlight_type {
DSI_BACKLIGHT_PWM = 0,
DSI_BACKLIGHT_WLED,
DSI_BACKLIGHT_DCS,
DSI_BACKLIGHT_DUMMY,
DSI_BACKLIGHT_EXTERNAL,
DSI_BACKLIGHT_UNKNOWN,
DSI_BACKLIGHT_MAX,