On 08/31/11 11:57, michael.hennerich@xxxxxxxxxx wrote: > From: Michael Hennerich <michael.hennerich@xxxxxxxxxx> > > ideally in_voltageX_raw should map to AD7291 VINX. > Indeed, that's more logical. > Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx> Merged to iio-blue. > --- > drivers/staging/iio/adc/ad7291.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c > index b6be672..32944f3 100644 > --- a/drivers/staging/iio/adc/ad7291.c > +++ b/drivers/staging/iio/adc/ad7291.c > @@ -434,7 +434,7 @@ static int ad7291_read_raw(struct iio_dev *indio_dev, > } > /* Enable this channel alone */ > regval = chip->command & (~AD7291_VOLTAGE_MASK); > - regval |= 1 << (chan->channel + 8); > + regval |= 1 << (15 - chan->channel); > ret = ad7291_i2c_write(chip, AD7291_COMMAND, regval); > if (ret < 0) { > mutex_unlock(&chip->state_lock); -- 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