On Tue, May 12, 2009 at 09:55:19AM +0200, Valentin Eduardo (Nokia-D/Helsinki) wrote: > > >> > > >> What sort of platform data do you need to pass to the i2c driver? I have > > >> yet > > >> to see a valid use case for this that can't be handled in a different > > >> way. > > >> Remember that devices like this are not limited to fixed platforms, but > > >> can > > >> also be used in USB or PCI devices. > > > > > > Yes, sure. Well, a simple "set_power" procedure is an example of things > > > that > > > I see as platform specific. Which may be passed by platform data > > > structures. > > > In some platform a set power / reset line may be done by a simple gpio. > > > but > > > in others it may be a different procedure. > > > > The v4l2_device struct has a notify callback: you can use that one > > instead. That way the subdev driver doesn't have to have any knowledge > > about the platform it is used in. > > Right. I see. But in that case the brigde driver would be bound to > a board specific? For instance of this very driver, I wrote a platform > driver just to make its radio interface. But I don't think it is a good > idea to bound the platform driver to a board specific creating a notification > handler just to set the power of the i2c chip. I see this procedure as a board > specific thing. As well as the IRQ line for instance. That configuration is > also board specific. Which is usually passed using i2c board info. Correct me > if I'm wrong. Even though I still can pass board specific to the platform driver using its platform data and then use the notify callback of v4l2_device, I still will miss the configuration for IRQ line. I don't see how to pass that to the i2c subdev by using the current helper functions. > > > > > Regards, > > > > Hans > > > > -- > > Hans Verkuil - video4linux developer - sponsored by TANDBERG > > -- > Eduardo Valentin -- Eduardo Valentin -- 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