On Mon, 25 Jul 2011 12:30:41 +0100, Jonathan Cameron <jic23@xxxxxxxxx> wrote: > On 07/22/11 23:26, Vivien Didelot wrote: > > For some reason, IIO_ATTR_2 has been deleted by commit > > 99e5dc45b854b4b661044e807905152911ed3fdb but it is still used by > > the macro IIO_DEVICE_ATTR_2. This patch restores it. > > Please ignore it if it shouldn't exist anymore. If so, this would > > need to remove IIO_DEVICE_ATTR_2 as well. Obviously it seems to be > > useful as the struct iio_dev_attr has a val2 member. > Good spot. Do you have a user for the two parameter version? If not > I'd prefer to just scrap the IIO_DEVICE_ATTR_2 until we actually need > it. That also means we can scrap val2 from struct iio_dev_attr which > is a nice little clean up. How about the following? I'm actually using the second member, as I'm trying to move the TS-5500 ADC driver from HWMON to IIO (you can see the HWMON patch here: https://lkml.org/lkml/diff/2011/7/19/223/1). It is used in the ts5500_adc_show_range() function (nr is the equivalent of val2). But I've found the ad7291.c driver which is 8 channels as well. It might offer a solution that avoids using this second parameter. Is it a good driver to refer to in this case? Regards, Vivien. -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html