Re: problem with the register of driver that works with soc_camera_subsystem

Ryan Raasch <[email protected]> Tue, 12 Jan 2010 11:41:49 +0100
Newsgroups gmane.comp.video.video4linux
Message-ID <[email protected]>

Carlos Lavin wrote:
> I am trying build a system on video with mx27 and ov7670 sensor but when I
> want register my driver that works with soc_camera subsystem in the 2.6.30
> version(I have works in this version because my boss wants it that way ), I
> executed the function "soc_camera_host_register(&mx27_soc_camera_host);" In
> the probe function of host-camera, this funcion is in the soc_camera.c and
> this function call to "scan_add_host" and this funcion is:
> 1- static void scan_add_host(struct soc_camera_host *ici)
> 2- {
> 3-    struct soc_camera_device *icd;
> 4-    mutex_lock(&list_lock);
> 5-    list_for_each_entry(icd, &devices, list) {
> 6-        if (icd->iface == ici->nr) {
> 7-            icd->dev.parent = &ici->dev;
> 8-            device_register_link(icd);
> 9-        }
> 10-    }
> 11-   mutex_unlock(&list_lock);
> 12-}
> 
> Well, in the probe function of camera-host I put ici->nr=0 (ici is
> soc_camera_host); but icd-> iface I don't know where is declared, in my chip
> camera I declare a soc_camera_device where I put the iface=0, but in this

In the device specific startup file, there needs to be a structure

static struct soc_camera_link iclink

I use the mach-pxa. Look in the arch/arm/mach-pxa/pcm990-baseboard.c for 
an example of how to integrate a soc camera.

Cheers,
Ryan


> function, "scan_add_host" in the if of line 6, the icd-iface is different of
> 0, and the function device_register_link isn't executed.
> 
> In the chip_camera this function,"device_register_link"(is called for your
> appropriate function,scan_add_device) yes is executed, anybody know anything
> about this problem? is a problem or this function only is necessary to
> execute one once for both(chip-camera and host-camera), I think that is
> necessary that this function is executed for both but I am rookie in this
> topics. anybody help me?
> Thanks for your time.
> --
> video4linux-list mailing list
> Unsubscribe mailto:[email protected]?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list