Re: adv7180 as SoC camera device

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

 



On Fri, Apr 02, 2010 at 09:09:30AM +0200, Guennadi Liakhovetski wrote:
> On Thu, 1 Apr 2010, Rodolfo Giometti wrote:
> 
> > On Tue, Mar 30, 2010 at 04:06:11PM +0200, Rodolfo Giometti wrote:
> > > On Tue, Feb 23, 2010 at 12:19:13AM +0100, Richard Röjfors wrote:
> > > > 
> > > > We use it as a subdev to a driver not yet committed from us. So I think
> > > > you should extend it, not move it.
> > > 
> > > Finally I got something functional... but I'm puzzled to know how I
> > > can add platform data configuration struct by using the I2C's
> > > platform_data pointer if it is already used to hold struct
> > > soc_camera_device... O_o
> > 
> > Here my solution:
> > 
> > static __devinit int adv7180_probe(struct i2c_client *client,
> >                         const struct i2c_device_id *id)
> > {
> >         struct adv7180_state *state;
> > #if defined(CONFIG_SOC_CAMERA)
> >         struct soc_camera_device *icd = client->dev.platform_data;
> >         struct soc_camera_link *icl;
> >         struct adv7180_platform_data *pdata = NULL;
> > #else
> >         struct adv7180_platform_data *pdata =
> > 	client->dev.platform_data;
> > #endif
> 
> No, we don't want any ifdefs in drivers. And the current driver doesn't 
> use the platform data, so, I would just leave it as it is - if NULL - no 
> soc-camera and no platform data, if it set - soc-camera environment is 
> used. That's until we standardise the use of platform data for v4l i2c 
> devices.

Ok. Thanks! :)

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver                          giometti@xxxxxxxx
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
--
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