On 02/22/11 09:29, Jean Delvare wrote: > Hi Jonathan, > > On Mon, 21 Feb 2011 16:10:14 +0000, Jonathan Cameron wrote: >> On 02/15/11 20:49, Andrew Chew wrote: >>>> As some of the platform not support irq_to_gpio, we pass gpio port >>>> by platform data. >>> >>> Looks good to me. >>> >>> Signed-off-by: Andrew Chew <achew@xxxxxxxxxx> >> Firstly, please cc linux-iio for patches effecting iio drivers. >> >> Hmm.. It's a bit of a pain that i2c devices don't take platform resources >> or we could avoid doing this entirely. I have a vague recollection of this >> being suggested in the past, but never happening (might have been for spi >> rather than i2c though...) Jean, can you comment on this? > > I fear I don't have the slightest idea of what you're talking about. > "Taking platform resources"? Sorry, I should have written a proper description of what I meant. Add to i2c_board_info the following struct resource *resource; which is defined in ioport.h I thought this actually allowed for gpio's but right now can't figure out how to handle them. What it definitely does handle cleanly is devices with multiple irq's. You basically get to query for resources by name so can pass lots of 'platform data' type stuff without having to define a specific structure for passing it in. > >> Dmitry isn't going to want that header in the linux/input directory. > > And he would be right. Header files containing platform data structures > for i2c device drivers go to include/linux/i2c. Cool. I'd kind of assumed they moved out when i2c/chips went away, but never actually checked! > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel