From: Tomi Valkeinen Date: Mon, 20 Dec 2010 14:26:22 +0000 (+0200) Subject: OMAP: DSS2: DSI: ensure VDDS_DSI is disabled on exit X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=88257b26953f73f30acf49587cb42b84be43c587;p=deliverable%2Flinux.git OMAP: DSS2: DSI: ensure VDDS_DSI is disabled on exit The panel drivers can leave the VDDS_DSI regulator enabled, even when the panel is disabled, to ensure that the DSI pins are powered. This patch ensures that VDDS_DSI is disabled on DSI module unload. Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index fcda46c34d1c..f89994d7b000 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -4090,6 +4090,11 @@ err1: static void dsi_exit(void) { if (dsi.vdds_dsi_reg != NULL) { + if (dsi.vdds_dsi_enabled) { + regulator_disable(dsi.vdds_dsi_reg); + dsi.vdds_dsi_enabled = false; + } + regulator_put(dsi.vdds_dsi_reg); dsi.vdds_dsi_reg = NULL; }