RE: [PATCH 2/2] TVP514x Driver with Review comments fixed

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

 




Thanks,
Vaibhav Hiremath

> -----Original Message-----
> From: David Brownell [mailto:david-b@xxxxxxxxxxx]
> Sent: Tuesday, December 02, 2008 12:09 PM
> To: Hiremath, Vaibhav
> Cc: dbrownell@xxxxxxxxxxxxxxxxxxxxx; video4linux-list@xxxxxxxxxx;
> davinci-linux-open-source-bounces@xxxxxxxxxxxxxxxxxxxx; linux-
> omap@xxxxxxxxxxxxxxx; Jadav, Brijesh R; Shah, Hardik; Hadli,
> Manjunath; R, Sivaraj; Karicheri, Muralidharan
> Subject: Re: [PATCH 2/2] TVP514x Driver with Review comments fixed
> 
> On Monday 01 December 2008, Hiremath, Vaibhav wrote:
> > >
> > > Another common use of driver_data is to hold a pointer
> > > to a struct holding chip-specific data that doesn't fit
> > > into a simple bitmask.
> > >
> > [Hiremath, Vaibhav] I am trying to use/save complete init sequence
> in
> > id->driver_data -
> >
> > static const struct i2c_device_id tvp514x_id[] = {
> >         {"tvp5146", (unsigned int)&tvp5146_init},
> 
> Well, kernel_ulong_t ...
> 
> >         {"tvp5146m2", (unsigned int)&tvp514xm_init},
> >         {"tvp5147", (unsigned int)&tvp5147_init},
> >         {"tvp5147m1", (unsigned int)&tvp514xm_init},
> >         {},
> > };
> >
> > NOTE: Please note that init sequence for 46, 47 are different.
> >
> 
> > I prefer to use second option, instead of comparing the name
> string in
> > s_power every time. And it will be very easy to add even more
> chips
> > providing generic solution; we need to just add entry to
> i2c_device_id
> > with expected init sequence and you are done.
> 
> If I interpret your words correctly, I agree.  The whole point of
> the id table is to let probe just use the "id" directly to get at
> descriptors with chip-specific data.
> 
> - Dave
> 
[Hiremath, Vaibhav] We are almost on same page, but you are looking to implement this in probe function where we do have "id" straight coming as params.
But for the devices like OMAP where power management is critical thing, I want to put the TVP to off state and bring it again whenever required (being used). For this, we do have ioctl interface called " ioctl_s_power" under V4L2-Int framework. 

To get the sequence supported for registered chip (46/47/4xM), I need index under the I2C_table (client->driver->id_table[index]) which will give me the driver_data for registered chip.

> 
> > Any suggestions or inputs appreciated???
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux