media: i2c: fix gc2385 pwdn sequence fault

Change-Id: I35e020a61a0c12069632fe357bfe163bd6259e11
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
This commit is contained in:
Wang Panzhenzhuan
2019-06-06 16:37:25 +08:00
committed by Tao Huang
parent fcf55e4df4
commit a7481ed1f0

View File

@@ -664,7 +664,7 @@ static int __gc2385_power_on(struct gc2385 *gc2385)
usleep_range(500, 1000);
if (!IS_ERR(gc2385->pwdn_gpio))
gpiod_set_value_cansleep(gc2385->pwdn_gpio, 0);
gpiod_set_value_cansleep(gc2385->pwdn_gpio, 1);
/* 8192 cycles prior to first SCCB transaction */
delay_us = gc2385_cal_delay(8192);
@@ -683,7 +683,7 @@ static void __gc2385_power_off(struct gc2385 *gc2385)
int ret = 0;
if (!IS_ERR(gc2385->pwdn_gpio))
gpiod_set_value_cansleep(gc2385->pwdn_gpio, 1);
gpiod_set_value_cansleep(gc2385->pwdn_gpio, 0);
clk_disable_unprepare(gc2385->xvclk);
if (!IS_ERR(gc2385->reset_gpio))
gpiod_set_value_cansleep(gc2385->reset_gpio, 1);