Skip to content

Commit f1794fd

Browse files
Mircea Capriorujic23
authored andcommitted
iio: adc: ad7124: Remove input number limitation
The driver limits the user to use only 4/8 differential inputs, but this device has the option to use pseudo-differential channels. This will increase the number of channels to be equal with the number of inputs so 8 channels for ad7124-4 and 16 for ad7124-8. This patch removes the check between channel nodes and num_inputs value. Signed-off-by: Mircea Caprioru <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 6a80368 commit f1794fd

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/iio/adc/ad7124.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,6 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev,
462462
if (ret)
463463
goto err;
464464

465-
if (ain[0] >= st->chip_info->num_inputs ||
466-
ain[1] >= st->chip_info->num_inputs) {
467-
dev_err(indio_dev->dev.parent,
468-
"Input pin number out of range.\n");
469-
ret = -EINVAL;
470-
goto err;
471-
}
472465
st->channel_config[channel].ain = AD7124_CHANNEL_AINP(ain[0]) |
473466
AD7124_CHANNEL_AINM(ain[1]);
474467
st->channel_config[channel].bipolar =

0 commit comments

Comments
 (0)