Hi Jonathan, [snip] On Sun, Mar 26, 2017 at 11:24:54AM +0100, Jonathan Cameron wrote: > >>>> +static struct iio_chan_spec max9611_channels[] = { > >> > >> const > >> > >>>> + { > >>>> + .type = IIO_TEMP, > >>>> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | > >>>> + BIT(IIO_CHAN_INFO_SCALE), > >>>> + .address = MAX9611_CHAN_TEMPERATURE, > >>>> + }, > >>>> + { > >>>> + .type = IIO_VOLTAGE, > >>>> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | > >>>> + BIT(IIO_CHAN_INFO_SCALE) | > >>>> + BIT(IIO_CHAN_INFO_OFFSET), > >>>> + .address = MAX9611_CHAN_VOLTAGE_INPUT, > >>>> + .indexed = 1, > >>>> + .channel = 1, > >> > >> why is this indexed? > >> should be the only raw voltage channel > >> > >> > >>>> + }, > >>>> + { > >>>> + .type = IIO_VOLTAGE, > >>>> + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), > >>>> + .address = MAX9611_CHAN_VOLTAGE_SENSE, > >>>> + .indexed = 1, > >>>> + .channel = 0, > >>> Unusual to have the channels in here other than in channel order... > >> > >> why is this indexed? > >> should be the only processed voltage channel > >> > > > > Jonathan already replied on this, but I would add that with no > > indexing this would appear in userspace as: > > > > in_voltage_raw > > in_voltage_scale > > in_voltage_offset > > in_offset_processed > > > > which is confusing at best. > I hope that last one is in_voltage_processed! Sure it is, I just confused channel name and mask name when writing it down here :) -- 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