Skip to content

Commit

Permalink
staging:iio:adc:ad7291: fix channel mapping
Browse files Browse the repository at this point in the history
ideally in_voltageX_raw should map to AD7291 VINX.

Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
mhennerich authored and gregkh committed Sep 6, 2011
1 parent 1067291 commit e70ab21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/ad7291.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,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);
Expand Down

0 comments on commit e70ab21

Please sign in to comment.