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

Commit f2fdcee3 authored by Yuan Zhao's avatar Yuan Zhao Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dsi: Set the panel test gpio to input



This GPIO is a input signal, so need to set it
to input mode, or it will lead leakage in RBC.
This change is only to fix the power issue.

Change-Id: I87716f646c75dac2f1350a2ea55188829a4ccc9e
Signed-off-by: default avatarYuan Zhao <yzhao@codeaurora.org>
parent a7b5db04
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -283,6 +283,16 @@ static int dsi_panel_gpio_request(struct dsi_panel *panel)
		}
	}

	if (gpio_is_valid(panel->panel_test_gpio)) {
		rc = gpio_request(panel->panel_test_gpio, "panel_test_gpio");
		if (rc) {
			pr_warn("request for panel_test_gpio failed, rc=%d\n",
				 rc);
			panel->panel_test_gpio = -1;
			rc = 0;
		}
	}

	goto error;
error_release_mode_sel:
	if (gpio_is_valid(panel->bl_config.en_gpio))
@@ -314,6 +324,9 @@ static int dsi_panel_gpio_release(struct dsi_panel *panel)
	if (gpio_is_valid(panel->reset_config.lcd_mode_sel_gpio))
		gpio_free(panel->reset_config.lcd_mode_sel_gpio);

	if (gpio_is_valid(panel->panel_test_gpio))
		gpio_free(panel->panel_test_gpio);

	return rc;
}

@@ -398,6 +411,14 @@ static int dsi_panel_reset(struct dsi_panel *panel)
		if (rc)
			pr_err("unable to set dir for mode gpio rc=%d\n", rc);
	}

	if (gpio_is_valid(panel->panel_test_gpio)) {
		rc = gpio_direction_input(panel->panel_test_gpio);
		if (rc)
			pr_warn("unable to set dir for panel test gpio rc=%d\n",
			       rc);
	}

exit:
	return rc;
}