Re: [PATCH v3 1/4] media: i2c: ov7251: wait for software reset before global init
From: Andy Shevchenko
Date: Sat Dec 05 2026 - 06:12:02 EST
On Mon, Nov 30, 2026 at 09:10:33PM +0100, Robert Ijtsma via B4 Relay wrote:
>
> ov7251_set_power_on() writes software reset (0x0103 = 0x01) as the first
> entry of ov7251_global_init_setting[] and immediately follows it with
> the remaining common initialization registers.
>
> Issue OV7251_SC_SOFTWARE_RESET explicitly and wait 5-10 ms for the
> sensor to finish resetting before writing ov7251_global_init_setting[]
> so subsequent I2C writes are not NACKed or lost during reset.
...
> usleep_range(wait_us, wait_us + 1000);
(*yes, I see the original code uses that, which might be worth to revisit)
>
> + ret = ov7251_write_reg(ov7251, OV7251_SC_SOFTWARE_RESET,
> + OV7251_SC_SOFTWARE_RESET_ASSERT);
> + if (ret < 0)
> + goto err_power_off;
> + usleep_range(5000, 10000);
fsleep(5 * USEC_PER_MSEC) ?
--
With Best Regards,
Andy Shevchenko