Commit 920f8809 authored by Subbaraya Sundeep Bhatta's avatar Subbaraya Sundeep Bhatta Committed by Greg Kroah-Hartman

iio: adc: xilinx-xadc: assign auxiliary channels address correctly

commit 1887e724 upstream.

This patch fixes incorrect logic for assigning address
to auxiliary channels of xilinx xadc.
Signed-off-by: default avatarSubbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 943a4dce
...@@ -1126,7 +1126,7 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np, ...@@ -1126,7 +1126,7 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np,
chan->address = XADC_REG_VPVN; chan->address = XADC_REG_VPVN;
} else { } else {
chan->scan_index = 15 + reg; chan->scan_index = 15 + reg;
chan->scan_index = XADC_REG_VAUX(reg - 1); chan->address = XADC_REG_VAUX(reg - 1);
} }
num_channels++; num_channels++;
chan++; chan++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment