Message ID | 20250120101123.148482-2-sakari.ailus@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] media: i2c: ov7251: Set enable GPIO low in probe | expand |
On Mon, 20 Jan 2025 at 10:11, Sakari Ailus <sakari.ailus@linux.intel.com> wrote: > > Lift the xshutdown (enable) GPIO 1 ms after enabling the regulators, as > required by the sensor's power-up sequence. > > Fixes: d30bb512da3d ("media: Add a driver for the ov7251 camera sensor") > Cc: stable@vger.kernel.org > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> > --- > drivers/media/i2c/ov7251.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c > index f3e2d26bb840..3226888d77e9 100644 > --- a/drivers/media/i2c/ov7251.c > +++ b/drivers/media/i2c/ov7251.c > @@ -922,6 +922,8 @@ static int ov7251_set_power_on(struct device *dev) > return ret; > } > > + usleep_range(1000, 1100); > + > gpiod_set_value_cansleep(ov7251->enable_gpio, 1); > > /* wait at least 65536 external clock cycles */ > -- > 2.39.5 > >
On Mon, Jan 20, 2025 at 12:11:23PM +0200, Sakari Ailus wrote: > Lift the xshutdown (enable) GPIO 1 ms after enabling the regulators, as > required by the sensor's power-up sequence. ... > + usleep_range(1000, 1100); Why not fsleep() ?
diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c index f3e2d26bb840..3226888d77e9 100644 --- a/drivers/media/i2c/ov7251.c +++ b/drivers/media/i2c/ov7251.c @@ -922,6 +922,8 @@ static int ov7251_set_power_on(struct device *dev) return ret; } + usleep_range(1000, 1100); + gpiod_set_value_cansleep(ov7251->enable_gpio, 1); /* wait at least 65536 external clock cycles */
Lift the xshutdown (enable) GPIO 1 ms after enabling the regulators, as required by the sensor's power-up sequence. Fixes: d30bb512da3d ("media: Add a driver for the ov7251 camera sensor") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/media/i2c/ov7251.c | 2 ++ 1 file changed, 2 insertions(+)