Web lists-archives.org

Re: question about SoC Camera driver (Micron)




On Tue, 13 May 2008, Darius wrote:

> Now I see how it works. I2C devices should be created before driver loading.
> There was my mistake, and driver does not call probe() function. Maybe would
> be better to create I2C devices by driver itself, not by the board specific
> config code? Now sensor driver is useless itself, without board specific
> configuration... Would be correct to do so?

No. This is not how the driver model works. PCI drivers do not register 
PCI devices. The PCI host controller scans the PCI bus and adds devices 
into the system, to be later matched against PCI drivers. Similar for USB 
devices, etc. The problem with i2c you cannot reliably scan the bus. 
Therefore the information about devices present on the system has to come 
from elsewhere: when it is an i2c device embedded into a USB web-camera, 
its driver "knows", there's an i2c device and registers it. On embedded 
systems the platform knows what i2c devices are onboard, and registers 
them using i2c_register_board_info(), on powerpc (and sparc?) you can 
register i2c devices in your device tree, etc.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list