Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abe1cb8f authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: add new backlight for secondary panel for SM8150 CDP"

parents 68210fc4 e023e6b9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -173,6 +173,14 @@ Optional properties:
					"bl_ctrl_pwm" = Backlight controlled by PWM gpio.
					"bl_ctrl_wled" = Backlight controlled by WLED.
					"bl_ctrl_dcs" = Backlight controlled by DCS commands.
					"bl_ctrl_external" = Backlight controlled by externally
					other: Unknown backlight control. (default)
- qcom,mdss-dsi-sec-bl-pmic-control-type: A string that specifies the implementation of backlight
					  control for secondary panel.
					  "bl_ctrl_pwm" = Backlight controlled by PWM gpio.
                                          "bl_ctrl_wled" = Backlight controlled by WLED.
                                          "bl_ctrl_dcs" = Backlight controlled by DCS commands.
                                          "bl_ctrl_external" = Backlight controlled by externally
                                          other: Unknown backlight control. (default)
- qcom,mdss-dsi-bl-pwm-pmi:		Boolean to indicate that PWM control is through second pmic chip.
- qcom,mdss-dsi-bl-pmic-bank-select:	LPG channel for backlight.
+3 −0
Original line number Diff line number Diff line
@@ -227,6 +227,7 @@
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
	qcom,panel-sec-supply-entries = <&dsi_panel_pwr_supply_vdd_no_labibb>;
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
	qcom,mdss-dsi-sec-bl-pmic-control-type = "bl_ctrl_external";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,mdss-dsi-mode-sel-gpio-state = "single_port";
@@ -240,6 +241,7 @@
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
	qcom,panel-sec-supply-entries = <&dsi_panel_pwr_supply_vdd_no_labibb>;
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
	qcom,mdss-dsi-sec-bl-pmic-control-type = "bl_ctrl_external";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,mdss-dsi-mode-sel-gpio-state = "single_port";
@@ -253,6 +255,7 @@
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
	qcom,panel-sec-supply-entries = <&dsi_panel_pwr_supply_vdd_no_labibb>;
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
	qcom,mdss-dsi-sec-bl-pmic-control-type = "bl_ctrl_external";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,mdss-dsi-mode-sel-gpio-state = "single_port";
+16 −3
Original line number Diff line number Diff line
@@ -642,6 +642,8 @@ 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_EXTERNAL:
		break;
	default:
		pr_err("Backlight type(%d) not supported\n", bl->type);
		rc = -ENOTSUPP;
@@ -665,6 +667,7 @@ static u32 dsi_panel_get_brightness(struct dsi_backlight_config *bl)
			cur_bl_level = bd->ops->get_brightness(bd);
		break;
	case DSI_BACKLIGHT_DCS:
	case DSI_BACKLIGHT_EXTERNAL:
	default:
		/*
		 * Ideally, we should read the backlight level from the
@@ -698,6 +701,8 @@ static int dsi_panel_bl_register(struct dsi_panel *panel)
		break;
	case DSI_BACKLIGHT_DCS:
		break;
	case DSI_BACKLIGHT_EXTERNAL:
		break;
	default:
		pr_err("Backlight type(%d) not supported\n", bl->type);
		rc = -ENOTSUPP;
@@ -721,6 +726,8 @@ static int dsi_panel_bl_unregister(struct dsi_panel *panel)
		break;
	case DSI_BACKLIGHT_DCS:
		break;
	case DSI_BACKLIGHT_EXTERNAL:
		break;
	default:
		pr_err("Backlight type(%d) not supported\n", bl->type);
		rc = -ENOTSUPP;
@@ -1997,10 +2004,14 @@ static int dsi_panel_parse_bl_config(struct dsi_panel *panel)
	const char *bl_type;
	const char *data;
	struct dsi_parser_utils *utils = &panel->utils;
	char *bl_name;

	bl_type = utils->get_property(utils->data,
				  "qcom,mdss-dsi-bl-pmic-control-type",
				  NULL);
	if (!strcmp(panel->type, "primary"))
		bl_name = "qcom,mdss-dsi-bl-pmic-control-type";
	else
		bl_name = "qcom,mdss-dsi-sec-bl-pmic-control-type";

	bl_type = utils->get_property(utils->data, bl_name, NULL);
	if (!bl_type) {
		panel->bl_config.type = DSI_BACKLIGHT_UNKNOWN;
	} else if (!strcmp(bl_type, "bl_ctrl_pwm")) {
@@ -2009,6 +2020,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_external")) {
		panel->bl_config.type = DSI_BACKLIGHT_EXTERNAL;
	} else {
		pr_debug("[%s] bl-pmic-control-type unknown-%s\n",
			 panel->name, bl_type);
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ enum dsi_backlight_type {
	DSI_BACKLIGHT_PWM = 0,
	DSI_BACKLIGHT_WLED,
	DSI_BACKLIGHT_DCS,
	DSI_BACKLIGHT_EXTERNAL,
	DSI_BACKLIGHT_UNKNOWN,
	DSI_BACKLIGHT_MAX,
};