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

Commit e2c74c7c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mdss: dsi: Add support to control bias voltage regulator"

parents 500e7da1 6bfe6183
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ Optional properties:
					controller. These pin configurations are installed in the pinctrl
					device node. Refer to pinctrl-bindings.txt
- qcom,regulator-ldo-mode:		Boolean to enable ldo mode for the dsi phy regulator
- qcom,dsi-panel-bias-vreg:		Boolean to enable control of panel bias regulator

Example:
        mdss_dsi0: qcom,mdss_dsi@fd922800 {
@@ -105,6 +106,7 @@ Example:
		qcom,platform-enable-gpio = <&msmgpio 58 1>;
		qcom,platform-bklight-en-gpio = <&msmgpio 86 0>;
		qcom,platform-mode-gpio = <&msmgpio 7 0>;
		qcom,dsi-panel-bias-vreg;

		qcom,core-supply-entries {
			#address-cells = <1>;
+29 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/gpio.h>
#include <linux/err.h>
#include <linux/regulator/consumer.h>
#include <linux/leds-qpnp-wled.h>

#include "mdss.h"
#include "mdss_panel.h"
@@ -100,6 +101,16 @@ static int mdss_dsi_panel_power_on(struct mdss_panel_data *pdata, int enable)
				goto error_enable;
			}
		}
		if (ctrl_pdata->panel_bias_vreg) {
			pr_debug("%s: Enable panel bias vreg. ndx = %d\n",
			       __func__, ctrl_pdata->ndx);
			if (qpnp_ibb_enable(true))
				pr_err("Unable to configure bias vreg\n");
			/*
			 * Add delay recommended by panel specs
			 */
			udelay(2000);
		}

		if (!pdata->panel_info.mipi.lp11_init) {
			if (mdss_dsi_pinctrl_set_state(ctrl_pdata, true))
@@ -122,6 +133,16 @@ static int mdss_dsi_panel_power_on(struct mdss_panel_data *pdata, int enable)
		if (mdss_dsi_pinctrl_set_state(ctrl_pdata, false))
			pr_debug("reset disable: pinctrl not enabled\n");

		if (ctrl_pdata->panel_bias_vreg) {
			pr_debug("%s: Disabling panel bias vreg. ndx = %d\n",
			       __func__, ctrl_pdata->ndx);
			if (qpnp_ibb_enable(false))
				pr_err("Unable to disable bias vreg\n");
			/*
			 * Add delay recommended by panel specs
			 */
			udelay(2000);
		}
		for (i = DSI_MAX_PM - 1; i >= 0; i--) {
			/*
			 * Core power module will be disabled when the
@@ -1465,6 +1486,14 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
		}
	}

	/*
	 * Currently, the Bias vreg is controlled by wled driver.
	 * Once we have support from pmic driver, implement the
	 * bias vreg control using the existing vreg apis.
	 */
	ctrl_pdata->panel_bias_vreg = of_property_read_bool(
			pdev->dev.of_node, "qcom,dsi-panel-bias-vreg");

	/* DSI panels can be different between controllers */
	rc = mdss_dsi_get_panel_cfg(panel_cfg);
	if (!rc)
+1 −0
Original line number Diff line number Diff line
@@ -306,6 +306,7 @@ struct mdss_dsi_ctrl_pdata {
	int bklt_max;
	int new_fps;
	int pwm_enabled;
	bool panel_bias_vreg;
	struct mdss_rect roi;
	struct pwm_device *pwm_bl;
	struct dsi_drv_cm_data shared_pdata;