Commit graph

5 commits

Author SHA1 Message Date
Josh Wu dc51b7d015 [media] v4l2-clk: v4l2_clk_get() also need to find the of_fullname clock
The soc-camera host will be probed and register a v4l2_clk, but if at
that moment, the i2c device is not available, then the registered
v4l2_clk name is an OF string not a I2C string.

So when i2c sensor probes and calls v4l2_clk_get(), it only searches a
clock with I2C string, like "1-0030".

This patch will search the clock with OF string name if no clock with
I2C string name could be found.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 15:19:52 -02:00
Guennadi Liakhovetski 4f528afcfb [media] V4L: add CCF support to the v4l2_clk API
V4L2 clocks, e.g. used by camera sensors for their master clock, do not
have to be supplied by a different V4L2 driver, they can also be
supplied by an independent source. In this case the standart kernel
clock API should be used to handle such clocks. This patch adds support
for such cases.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 18:33:42 -03:00
Guennadi Liakhovetski a37462b919 [media] V4L: remove clock name from v4l2_clk API
All uses of the v4l2_clk API so far only register one clock with a fixed
name. This allows us to get rid of it, which also will make CCF and DT
integration easier.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 18:32:53 -03:00
Guennadi Liakhovetski cf326dfebe [media] V4L2: add v4l2-clock helpers to register and unregister a fixed-rate clock
Many bridges and video host controllers supply fixed rate always on clocks
to their I2C devices. This patch adds two simple helpers to register and
unregister such a clock.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-31 04:31:30 -02:00
Guennadi Liakhovetski ff5430de70 [media] V4L2: add temporary clock helpers
Typical video devices like camera sensors require an external clock source.
Many such devices cannot even access their hardware registers without a
running clock. These clock sources should be controlled by their consumers.
This should be performed, using the generic clock framework. Unfortunately
so far only very few systems have been ported to that framework. This patch
adds a set of temporary helpers, mimicking the generic clock API, to V4L2.
Platforms, adopting the clock API, should switch to using it. Eventually
this temporary API should be removed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21 16:28:02 -03:00