diff options
author | Ingrid Gallardo <ingridg@codeaurora.org> | 2016-02-23 17:24:43 -0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:02:39 -0700 |
commit | 88e3bbd091cf4f222221d2c66cf5418e35466737 (patch) | |
tree | c05ae0058ba312a3f00d83a59e56a21fa0190ddc /drivers | |
parent | d5d9af1ba996f590740a68395a7339e2195212d6 (diff) |
msm: mdss: fix to update the configuration for display related GPIOs
After commit dbe80b7cc96a1f3f23246552fbd2352f334fa857 ("ARM: dts: msm:
remove gpio output settings in dsi pinctrl") driver is no longer
defining in the pinctrl the gpios as output high configuration;
so driver now has to explicitly configure gpio output direction.
This change add the settings in the driver to configure the gpio
as output pin, fixing panel issues when booting-up with
continuous splash disabled.
Change-Id: I1ac3c5dd07cff4a30cce9de3c340f071dd84d49a
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_panel.c | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c index 11e95af87c19..9108bee02445 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_panel.c +++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c @@ -313,8 +313,25 @@ int mdss_dsi_panel_reset(struct mdss_panel_data *pdata, int enable) return rc; } if (!pinfo->cont_splash_enabled) { - if (gpio_is_valid(ctrl_pdata->disp_en_gpio)) - gpio_set_value((ctrl_pdata->disp_en_gpio), 1); + if (gpio_is_valid(ctrl_pdata->disp_en_gpio)) { + rc = gpio_direction_output( + ctrl_pdata->disp_en_gpio, 1); + if (rc) { + pr_err("%s: unable to set dir for en gpio\n", + __func__); + goto exit; + } + } + + if (pdata->panel_info.rst_seq_len) { + rc = gpio_direction_output(ctrl_pdata->rst_gpio, + pdata->panel_info.rst_seq[0]); + if (rc) { + pr_err("%s: unable to set dir for rst gpio\n", + __func__); + goto exit; + } + } for (i = 0; i < pdata->panel_info.rst_seq_len; ++i) { gpio_set_value((ctrl_pdata->rst_gpio), @@ -323,15 +340,31 @@ int mdss_dsi_panel_reset(struct mdss_panel_data *pdata, int enable) usleep_range(pinfo->rst_seq[i] * 1000, pinfo->rst_seq[i] * 1000); } - if (gpio_is_valid(ctrl_pdata->bklt_en_gpio)) - gpio_set_value((ctrl_pdata->bklt_en_gpio), 1); + if (gpio_is_valid(ctrl_pdata->bklt_en_gpio)) { + rc = gpio_direction_output( + ctrl_pdata->bklt_en_gpio, 1); + if (rc) { + pr_err("%s: unable to set dir for bklt gpio\n", + __func__); + goto exit; + } + } } if (gpio_is_valid(ctrl_pdata->mode_gpio)) { + bool out; + if (pinfo->mode_gpio_state == MODE_GPIO_HIGH) - gpio_set_value((ctrl_pdata->mode_gpio), 1); + out = true; else if (pinfo->mode_gpio_state == MODE_GPIO_LOW) - gpio_set_value((ctrl_pdata->mode_gpio), 0); + out = false; + + rc = gpio_direction_output(ctrl_pdata->mode_gpio, out); + if (rc) { + pr_err("%s: unable to set dir for mode gpio\n", + __func__); + goto exit; + } } if (ctrl_pdata->ctrl_state & CTRL_STATE_PANEL_INIT) { pr_debug("%s: Panel Not properly turned OFF\n", @@ -353,6 +386,8 @@ int mdss_dsi_panel_reset(struct mdss_panel_data *pdata, int enable) if (gpio_is_valid(ctrl_pdata->mode_gpio)) gpio_free(ctrl_pdata->mode_gpio); } + +exit: return rc; } |