* Must omap34xxcam be a module?
@ 2010-08-13 14:43 Michael Jones
2010-08-13 15:47 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Michael Jones @ 2010-08-13 14:43 UTC (permalink / raw)
To: laurent.pinchart, sakari.ailus@maxwell.research.nokia.com; +Cc: linux-media
Hi Laurent & Sakari,
Regarding the omap3camera/devel branch:
In v4l2-common.c:v4l2_i2c_new_subdev_board(), request_module() is called to ensure that the sensor driver is already registered before registering the sensor device. When I compile-in both my sensor driver and omap34xxcam with the kernel, this call to request_module() fails, and indeed omap34xxcam is initialized before my sensor driver, causing the omap34xxcam device registration to fail. When I leave omap34xxcam compiled-in and try to just let it load the sensor module when needed on bootup, request_module() fails. I haven't managed to track down why that is. When I compile both omap34xxcam and my sensor driver as modules, and load them after boot-up, registration succeeds.
Is it neccessary for omap34xxcam and its subdevices to be modules? How are you guys building these?
Full disclosure: my sensor is actually an SPI device, but the v4l2_spi_new_subdev() function I'm actually using seems to be _very_ analogous to its I2C counterpart, so I'm assuming SPI is not responsible.
thanks,
Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Must omap34xxcam be a module?
2010-08-13 14:43 Must omap34xxcam be a module? Michael Jones
@ 2010-08-13 15:47 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2010-08-13 15:47 UTC (permalink / raw)
To: Michael Jones; +Cc: sakari.ailus@maxwell.research.nokia.com, linux-media
Hi Michael,
On Friday 13 August 2010 16:43:13 Michael Jones wrote:
> Hi Laurent & Sakari,
>
> Regarding the omap3camera/devel branch:
>
> In v4l2-common.c:v4l2_i2c_new_subdev_board(), request_module() is called to
> ensure that the sensor driver is already registered before registering the
> sensor device. When I compile-in both my sensor driver and omap34xxcam
> with the kernel, this call to request_module() fails, and indeed
> omap34xxcam is initialized before my sensor driver, causing the
> omap34xxcam device registration to fail.
>
> When I leave omap34xxcam compiled-in and try to just let it load the sensor
> module when needed on bootup, request_module() fails. I haven't managed to
> track down why that is.
That's because userspace isn't available yet when the omap34xxcam driver is
initialized, so there's no way to load a module at that time.
> When I compile both omap34xxcam and my sensor driver as modules, and
> load them after boot-up, registration succeeds.
>
> Is it neccessary for omap34xxcam and its subdevices to be modules? How are
> you guys building these?
At the moment it's indeed necessary. It's a V4L2 core issue, not specific to
omap34xxcam. I'm not aware of plans to fix this, but a proposal is welcome :-)
> Full disclosure: my sensor is actually an SPI device, but the
> v4l2_spi_new_subdev() function I'm actually using seems to be _very_
> analogous to its I2C counterpart, so I'm assuming SPI is not responsible.
The same issue exists with I2C, SPI is not responsible.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-13 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-13 14:43 Must omap34xxcam be a module? Michael Jones
2010-08-13 15:47 ` Laurent Pinchart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.