Re: [RFC/PATCH 2/6] v4l: subdev: Add device node support

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

 



Hi Hans,

On Wednesday 07 July 2010 15:04:17 Hans Verkuil wrote:
> > On Wednesday 07 July 2010 14:30:45 Hans Verkuil wrote:

[snip]

> > Some (most ?) I2C sensors need to be accessed during probe. This involves
> > powering the sensor up, which is handled by a board code function called
> > through a platform data function pointer.
> > 
> > On the OMAP3 ISP the sensor clock can be generated by the ISP. This means
> > that board code needs to call an ISP (exported) function to turn the clock
> > on. To do so we currently retrieve a pointer to the ISP device through the
> > subdev's parent v4l2_device, embedded in the ISP device structure. This
> > requires the subdev to be registered, otherwise its parent will be NULL.
> > For that reason we're still using the core::s_config operation.
> > 
> > This is obviously not an ideal situation, and I'm open to suggestions on
> > how to solve it without core::s_config. One possibility would be to use a
> > global ISP device pointer in the board code, as there's only one ISP
> > device in the system. It feels a bit hackish though.
> 
> Or make the v4l2_device pointer part of the platform data? That way the
> subdev driver has access to the v4l2_device pointer in a fairly clean
> manner.

As we've discussed on IRC, the platform data should really store hardware 
properties, not software/driver information. Beside, storing the v4l2_device 
pointer in the platform data would be quite difficult, as 
v4l2_device_register_subdev only sees a void * pointer for platform_data. It 
has no knowledge of the device-specific structure.

-- 
Regards,

Laurent Pinchart
--
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