aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/marvell-ccic/mmp-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/marvell-ccic/mmp-driver.c')
-rw-r--r--drivers/media/video/marvell-ccic/mmp-driver.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c b/drivers/media/video/marvell-ccic/mmp-driver.c
index 0d64e2d7474a..d23552323f45 100644
--- a/drivers/media/video/marvell-ccic/mmp-driver.c
+++ b/drivers/media/video/marvell-ccic/mmp-driver.c
@@ -106,6 +106,13 @@ static struct mmp_camera *mmpcam_find_device(struct platform_device *pdev)
106/* 106/*
107 * Power control. 107 * Power control.
108 */ 108 */
109static void mmpcam_power_up_ctlr(struct mmp_camera *cam)
110{
111 iowrite32(0x3f, cam->power_regs + REG_CCIC_DCGCR);
112 iowrite32(0x3805b, cam->power_regs + REG_CCIC_CRCR);
113 mdelay(1);
114}
115
109static void mmpcam_power_up(struct mcam_camera *mcam) 116static void mmpcam_power_up(struct mcam_camera *mcam)
110{ 117{
111 struct mmp_camera *cam = mcam_to_cam(mcam); 118 struct mmp_camera *cam = mcam_to_cam(mcam);
@@ -113,9 +120,7 @@ static void mmpcam_power_up(struct mcam_camera *mcam)
113/* 120/*
114 * Turn on power and clocks to the controller. 121 * Turn on power and clocks to the controller.
115 */ 122 */
116 iowrite32(0x3f, cam->power_regs + REG_CCIC_DCGCR); 123 mmpcam_power_up_ctlr(cam);
117 iowrite32(0x3805b, cam->power_regs + REG_CCIC_CRCR);
118 mdelay(1);
119/* 124/*
120 * Provide power to the sensor. 125 * Provide power to the sensor.
121 */ 126 */
@@ -335,7 +340,7 @@ static int mmpcam_resume(struct platform_device *pdev)
335 * touch a register even if nothing was active before; trust 340 * touch a register even if nothing was active before; trust
336 * me, it's better this way. 341 * me, it's better this way.
337 */ 342 */
338 mmpcam_power_up(&cam->mcam); 343 mmpcam_power_up_ctlr(cam);
339 return mccic_resume(&cam->mcam); 344 return mccic_resume(&cam->mcam);
340} 345}
341 346