Re: Re: host driver of camera

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Mon, 8 Oct 2012, tingtingyang@xxxxxxxxxxxx wrote:

>  Dear Guennadi,
> I am sorry , see you reply just now.
> I am in a puzzle about the soc camera 's init.
> In the following,
> 1. in soc_camera.c file
> 
> static struct platform_driver __refdata soc_camera_pdrv = {
> .remove  = __devexit_p(soc_camera_pdrv_remove),
> .driver  = {
> .name = "soc-camera-pdrv",
> .owner = THIS_MODULE,
> },
> };
> 
> 2.in pxa_camera.c  file
> 
> static struct platform_driver pxa_camera_driver = {
> .driver  = {
> .name = PXA_CAM_DRV_NAME,
> .pm = &pxa_camera_pm,
> },
> .probe = pxa_camera_probe,
> .remove = __devexit_p(pxa_camera_remove),
> };
> 
> My question is :
> In the soc board init file ,for example Devices.c . 

arch/arm/mach-pxa/devices.c is not a board init file, it is common for all 
PXA27x boards.

> I only find one 
> platform_device declare , soc-camera-pdrv or PXA_CAM_DRV_NAME .
> 
> But ,I think the two drivers should be both init . How the kernel do that  ?

See, e.g. in arch/arm/mach-pxa/pcm990-baseboard.c:

	pxa_set_camera_info(&pcm990_pxacamera_platform_data);

registers a platform device for the pxa_camera.c driver and

	platform_device_register(&pcm990_camera[0]);
	platform_device_register(&pcm990_camera[1]);

register two platform devices for the soc_camera.c driver, correcponding 
to two camera sensors mt9v022 and mt9m001.

Thanks
Guennadi

> 
> Regards
> tingtingyang
> 
> From: Guennadi Liakhovetski
> Date: 2012-10-08 19:20
> To: tingtingyang
> Subject: Re: host driver of camera
> On Mon, 8 Oct 2012, tingtingyang@xxxxxxxxxxxx wrote:
> 
> > Dear Guennadi 
> 
> I asked you to CC linux-media.
> 
> Regards
> Guennadi
> 
> > I am studing linux kernel 3.4.0 driver coed.
> > In the file of soc_camera.txt, has a word " 
> > - camera host - an interface, to which a camera is connected. Typically a
> > specialised interface, present on many SoCs, e.g., PXA27x and PXA3xx, SuperH,
> > AVR32, i.MX27, i.MX31.
> > "
> > But,I can not find the driver of camera host driver in pxa27x.c .
> > I know ,the host driver in the pxa_camera.c ,but I do not understand how the function be called or init ,because there are nothing about the camera host in the file pxa27x.c  .
> > 
> > Where could I get some example code of camera host driver being probe ?
> > Best Wishes.
> 
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux