Linux Media Controller development
 help / color / mirror / Atom feed
* Guidance regarding deferred I2C transactions
@ 2011-08-05 20:18 Andrew Chew
  2011-08-05 20:41 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Chew @ 2011-08-05 20:18 UTC (permalink / raw)
  To: g.liakhovetski@gmx.de
  Cc: linux-media@vger.kernel.org, 'Doug Anderson'

I'm looking for some guidance regarding a clean way to support a certain camera module. 
We are using the soc_camera framework, and in particular, the ov9740.c image sensor driver. 

This camera module has the camera activity status LED tied to the image sensor's power. This is meant as a security feature, so that there is no way to turn the camera on without the user being informed through the status LED.

The problem with this is that any I2C transaction to the image sensor necessitates turning the image sensor on, which results in the status LED turning on. Various methods in the soc camera sensor drivers typically perform I2C transactions. For example, probe will check the image sensor registers to validate device presence. However, this results in the LED blinking during probe, which can be misconstrued as the camera having taken an actual picture. Opening the /dev/video node will also typically blink the status LED for similar reasons (in this case, calling the s_mbus_fmt video op), so any application probing for camera presence will cause the status LED to blink. 

One way to solve this can be to defer these I2C transactions in the image sensor driver all the way up to the time the image sensor is asked to start streaming frames. However, it seems to me that this breaks the spirit of the probe; applications will successfully probe for camera presence even though the camera isn't actually there. Is this okay?

Is there a better way to do this? Maybe a more general thing we can add to the V4L2 framework?

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-05 23:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 20:18 Guidance regarding deferred I2C transactions Andrew Chew
2011-08-05 20:41 ` Mauro Carvalho Chehab
2011-08-05 21:01   ` Andrew Chew
2011-08-05 23:16     ` Guennadi Liakhovetski
2011-08-05 23:29       ` Mauro Carvalho Chehab
2011-08-05 23:57         ` Andrew Chew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox