diff mbox series

[3/4] media: i2c: ov02c10: Implement power-on reset

Message ID 20250315134009.157132-4-bryan.odonoghue@linaro.org (mailing list archive)
State New
Headers show
Series ov02c10: OF extensions and fixups | expand

Commit Message

Bryan O'Donoghue March 15, 2025, 1:40 p.m. UTC
Implement recommended power-on reset.

ov02c10 documentation states that the hardware reset is active low and that
the reset pulse should be greater than 2 milliseconds.

The power-on timing tables shows that t5 the time between XSHUTDOWN
deassert to system ready is a minimum 5 millseconds.

Implement the recommended power-on reset minimums.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/i2c/ov02c10.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Bryan O'Donoghue March 15, 2025, 1:50 p.m. UTC | #1
On 15/03/2025 13:40, Bryan O'Donoghue wrote:
> The power-on timing tables shows that t5 the time between XSHUTDOWN
> deassert to system ready is a minimum 5 millseconds.

The power-on timing table shows that .... minimum 5 milliseconds.

--
bod
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c
index 595998e60b22..d3dc614a3c01 100644
--- a/drivers/media/i2c/ov02c10.c
+++ b/drivers/media/i2c/ov02c10.c
@@ -696,8 +696,10 @@  static int ov02c10_power_on(struct device *dev)
 	}
 
 	if (ov02c10->reset) {
+		gpiod_set_value_cansleep(ov02c10->reset, 1);
+		usleep_range(2000, 2200);
 		gpiod_set_value_cansleep(ov02c10->reset, 0);
-		usleep_range(1500, 1800);
+		usleep_range(5000, 5100);
 	}
 
 	return 0;