Re: [PATCH] V4L: soc-camera: provide support for S_INPUT.

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

 



On Wednesday 04 January 2012 18:13:58 Guennadi Liakhovetski wrote:
> On Wed, 4 Jan 2012, Laurent Pinchart wrote:
> > On Wednesday 04 January 2012 17:35:27 Guennadi Liakhovetski wrote:
> > > On Wed, 4 Jan 2012, javier Martin wrote:
> > > 
> > > [snip]
> > > 
> > > > For ov7725 it is a natural thing to do since it was originally
> > > > developed for soc-camera and it can easily do the following to access
> > > > platform data:
> > > > 
> > > > struct soc_camera_link	*icl = soc_camera_i2c_to_link(client);
> > > > pdata = icl->priv;
> > > > 
> > > > However, tvp5150 is not aware about soc_camera. I should be able to
> > > > tell whether it's being used with soc-camera or not. If soc camera
> > > > was used I would do the previous method to retrieve platform data.
> > > > But if soc-camera was not used I would do the classic method:
> > > > 
> > > > struct tvp5150_platform_data *pdata = client->dev.platform_data;
> > > > 
> > > > The problem is how to distinguish in tvp5150 whether I am using
> > > > soc_camera or not.
> > > 
> > > Right, that _is_ the problem now. And we've known about it since the
> > > very first time we started to think about re-using the subdev drivers.
> > > The only solution I see so far is to introduce a standard platform
> > > data struct for all subdevices, similar to soc_camera_link. We could
> > > use it as a basis, of course, use a generic name, maybe reconsider
> > > fields - rename / remove / add, but the principle would be the same: a
> > > standard platform data struct with an optional private field.
> > 
> > Why is that needed ? Why can't a tvp5150-specific platform data structure
> > do ?
> 
> Javier has actually explained this already.

Sorry for not having followed.

> Ok, again: he wants to use tvp5150 with an soc-camera host driver, i.e.,
> with the soc-camera subsystem. And the soc-camera core sets board_info->
> platform_data itself to a pointer to the struct soc_camera_link instance.

That looks to me like it's the part to be changed...

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