summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2014-12-19 16:59:42 +0800
committerSandor Yu <R01008@freescale.com>2014-12-20 10:19:20 +0800
commit6adee22e7fbcad3ea39cf12b2bc3a534ff2f28f6 (patch)
tree06fd7d4443f7963420273fb91b99e805ab5f1acf
parente1959911edda217d547b2cd06bc6dcd198de36e8 (diff)
MLK-10041 : vadc: poweroff vadc analog when vadc remove
Poweroff vadc analog and ext power when module remove. Signed-off-by: Sandor Yu <R01008@freescale.com>
-rw-r--r--drivers/media/platform/mxc/capture/mxc_vadc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/mxc/capture/mxc_vadc.c b/drivers/media/platform/mxc/capture/mxc_vadc.c
index 6b3d5f62689c..4756b401ba1f 100644
--- a/drivers/media/platform/mxc/capture/mxc_vadc.c
+++ b/drivers/media/platform/mxc/capture/mxc_vadc.c
@@ -397,6 +397,15 @@ static void vadc_power_up(struct vadc_data *vadc)
reg32setbit(gpc_regbase + GPC_CNTR, 18);
}
+static void vadc_power_down(struct vadc_data *vadc)
+{
+ /* Power down vadc analog */
+ reg32setbit(gpc_regbase + GPC_CNTR, 17);
+
+ /* Power down vadc ext power */
+ reg32clrbit(gpc_regbase + GPC_CNTR, 18);
+}
+
static void vadc_init(struct vadc_data *vadc)
{
pr_debug("%s\n", __func__);
@@ -977,6 +986,7 @@ static int vadc_remove(struct platform_device *pdev)
clk_disable_unprepare(vadc->sen.sensor_clk);
clk_disable_unprepare(vadc->vadc_clk);
+ vadc_power_down(vadc);
return true;
}