mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
media: i2c: os04a10: fix power on sequence
1.The reset signal is directly controlled by GPIO, so there is no need to wait for the delay of RC circuit 2.Correct the level setting of reset signal Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com> Change-Id: I808a7ba13f23f630d1ab9d11c54cb33a1e85123c
This commit is contained in:
@@ -1731,7 +1731,7 @@ static int __os04a10_power_on(struct os04a10 *os04a10)
|
||||
return ret;
|
||||
}
|
||||
if (!IS_ERR(os04a10->reset_gpio))
|
||||
gpiod_set_value_cansleep(os04a10->reset_gpio, 0);
|
||||
gpiod_set_value_cansleep(os04a10->reset_gpio, 1);
|
||||
|
||||
ret = regulator_bulk_enable(OS04A10_NUM_SUPPLIES, os04a10->supplies);
|
||||
if (ret < 0) {
|
||||
@@ -1740,12 +1740,20 @@ static int __os04a10_power_on(struct os04a10 *os04a10)
|
||||
}
|
||||
|
||||
if (!IS_ERR(os04a10->reset_gpio))
|
||||
gpiod_set_value_cansleep(os04a10->reset_gpio, 1);
|
||||
gpiod_set_value_cansleep(os04a10->reset_gpio, 0);
|
||||
|
||||
usleep_range(500, 1000);
|
||||
if (!IS_ERR(os04a10->pwdn_gpio))
|
||||
gpiod_set_value_cansleep(os04a10->pwdn_gpio, 1);
|
||||
usleep_range(12000, 16000);
|
||||
/*
|
||||
* There is no need to wait for the delay of RC circuit
|
||||
* if the reset signal is directly controlled by GPIO.
|
||||
*/
|
||||
if (!IS_ERR(os04a10->reset_gpio))
|
||||
usleep_range(6000, 8000);
|
||||
else
|
||||
usleep_range(12000, 16000);
|
||||
|
||||
/* 8192 cycles prior to first SCCB transaction */
|
||||
delay_us = os04a10_cal_delay(8192);
|
||||
usleep_range(delay_us, delay_us * 2);
|
||||
|
||||
Reference in New Issue
Block a user