diff options
author | Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com> | 2014-09-19 07:23:23 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:21 -0400 |
commit | 95b8bd28f219ff32a123fd599f761e49b9e61508 (patch) | |
tree | 5b7efbef7c8537a72ca6179d1edadbb1a6167ba9 /drivers/video/tegra/dc/dsi.c | |
parent | afdca4030ad9c294828144ce242e47e8bb5b5d7b (diff) |
tegra: dc: Add shutdown event callback
Add shutdown event callback to dc out ops.
This helps in notifying system shutdown event to DC clients
before calling dc disable.
- Fixes regulator disable failure when device is shutting down
Bug 1552858
Change-Id: I1e945e6ff7b0cd6a37f6e001b9257061978c1d58
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/500726
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 94dcf02f5..407c307e3 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -4896,10 +4896,16 @@ static void tegra_dc_dsi_postpoweroff(struct tegra_dc *dc) | |||
4896 | { | 4896 | { |
4897 | struct tegra_dc_dsi_data *dsi = tegra_dc_get_outdata(dc); | 4897 | struct tegra_dc_dsi_data *dsi = tegra_dc_get_outdata(dc); |
4898 | 4898 | ||
4899 | if (!dsi->enabled && dsi->avdd_dsi_csi) | 4899 | /* Do not disable regulator when device is shutting down */ |
4900 | if (!dsi->device_shutdown && !dsi->enabled && dsi->avdd_dsi_csi) | ||
4900 | regulator_disable(dsi->avdd_dsi_csi); | 4901 | regulator_disable(dsi->avdd_dsi_csi); |
4901 | } | 4902 | } |
4903 | static void tegra_dc_dsi_shutdown(struct tegra_dc *dc) | ||
4904 | { | ||
4905 | struct tegra_dc_dsi_data *dsi = tegra_dc_get_outdata(dc); | ||
4902 | 4906 | ||
4907 | dsi->device_shutdown = true; | ||
4908 | } | ||
4903 | static int tegra_dsi_host_resume(struct tegra_dc *dc) | 4909 | static int tegra_dsi_host_resume(struct tegra_dc *dc) |
4904 | { | 4910 | { |
4905 | int err = 0; | 4911 | int err = 0; |
@@ -5145,6 +5151,7 @@ struct tegra_dc_out_ops tegra_dc_dsi_ops = { | |||
5145 | .postpoweroff = tegra_dc_dsi_postpoweroff, | 5151 | .postpoweroff = tegra_dc_dsi_postpoweroff, |
5146 | .hold = tegra_dc_dsi_hold_host, | 5152 | .hold = tegra_dc_dsi_hold_host, |
5147 | .release = tegra_dc_dsi_release_host, | 5153 | .release = tegra_dc_dsi_release_host, |
5154 | .shutdown = tegra_dc_dsi_shutdown, | ||
5148 | #ifdef CONFIG_PM | 5155 | #ifdef CONFIG_PM |
5149 | .suspend = tegra_dc_dsi_suspend, | 5156 | .suspend = tegra_dc_dsi_suspend, |
5150 | .resume = tegra_dc_dsi_resume, | 5157 | .resume = tegra_dc_dsi_resume, |