]> git.baikalelectronics.ru Git - kernel.git/commit
media: ov6650: Fix sensor possibly not detected on probe
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Mon, 25 Mar 2019 00:21:12 +0000 (20:21 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Apr 2019 15:32:36 +0000 (11:32 -0400)
commite1df9d124c22354ed4a9754308c307546c368af3
treeebd565695f735f1c90b8ef075d8717b8de69da1d
parent1254173c09ee480e00e90a1a8cdd5b6ec7f6109f
media: ov6650: Fix sensor possibly not detected on probe

After removal of clock_start() from before soc_camera_init_i2c() in
soc_camera_probe() by commit a0547815671d ("[media] soc-camera: switch
I2C subdevice drivers to use v4l2-clk") introduced in v3.11, the ov6650
driver could no longer probe the sensor successfully because its clock
was no longer turned on in advance.  The issue was initially worked
around by adding that missing clock_start() equivalent to OMAP1 camera
interface driver - the only user of this sensor - but a propoer fix
should be rather implemented in the sensor driver code itself.

Fix the issue by inserting a delay between the clock is turned on and
the sensor I2C registers are read for the first time.

Tested on Amstrad Delta with now out of tree but still locally
maintained omap1_camera host driver.

Fixes: a0547815671d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov6650.c