Re: [RFC PATCH 1/8] soc_camera V4L2 driver for directly-connected SoC-based cameras
- Date: Fri, 25 Jan 2008 17:17:54 +0100 (CET)
- From: Guennadi Liakhovetski <g.liakhovetski@xxxxxxxxxxxxxx>
- Subject: Re: [RFC PATCH 1/8] soc_camera V4L2 driver for directly-connected SoC-based cameras
On Fri, 25 Jan 2008, Sakari Ailus wrote:
> ext Guennadi Liakhovetski wrote:
> > As for the OMAP driver, right, it is indeed serving a similar purpose.
> > Unfortunately, I based my work on 2.6.23 and there it wasn't in the kernel
> > yet. Even now it is incomplete in the mainline, the platform (OMAP) part
> > and, I think, actual camera drivers are still only in a separate tree.
>
> Yes, the interface itself is in mainline now, just the OMAP 2 camera driver is
> missing. And you seem to have been hit by the TCM825x sensor driver already.
> ;)
>
> The int device stuff is not specific to cameras anyhow, you can easily add
> commands to support other kind of devices. It's just not there (at least yet)
> since I've been adding commands that are required by that particular
> combination.
>
> V4L2 int device only helps you in coupling the devices and enables master to
> use the services offered by the slave.
Right, that's why I said "it is indeed serving a similar purpose" above.
Which means, if I knew earlier about your driver, I would consider using
it for PXA270 too. But what I like about my driver, what, I think, is not
(yet) present in yours, is a virtual bus abstraction between camera hosts
("master" in your notation) and devices. So with my driver you can
register multiple camera host instances and multiple cameras per interface
(think stereo applications, for instance). And this is what you get under
/sys:
# tree /sys/bus/soc-camera/
/sys/bus/soc-camera/
|-- devices
| |-- 0-0 -> ../../../class/camera_host/camera_host0/0-0
| `-- 0-1 -> ../../../class/camera_host/camera_host0/0-1
|-- drivers
| `-- camera
| |-- 0-1 -> ../../../../class/camera_host/camera_host0/0-1
| |-- bind
| |-- module -> ../../../../module/soc_camera
| `-- unbind
|-- drivers_autoprobe
`-- drivers_probe
# tree /sys/class/camera_host/
/sys/class/camera_host/
`-- camera_host0
|-- 0-0
| |-- bus -> ../../../../bus/soc-camera
| |-- control -> ../../../../class/i2c-adapter/i2c-0/0-005d
| |-- subsystem -> ../../../../bus/soc-camera
| `-- uevent
|-- 0-1
| |-- bus -> ../../../../bus/soc-camera
| |-- control -> ../../../../class/i2c-adapter/i2c-0/0-0048
| |-- driver -> ../../../../bus/soc-camera/drivers/camera
| |-- subsystem -> ../../../../bus/soc-camera
| |-- uevent
| `-- video4linux:video0 -> ../../../../class/video4linux/video0
|-- device -> ../../../devices/platform/pxa2xx-camera.0
|-- subsystem -> ../../../class/camera_host
`-- uevent
Looks nice, doesn't it?:-) And it implements a "single point of entry" for
all v4l2 commands, so that host and camera drivers only have to interface
with the soc_camera driver and not with v4l2 directly. So, it would be
pity to just through it away, I hope, our drivers can co-exist in the
kernel for now...
Thanks
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list