linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 1/5] iio: adc: ad7124: Remove input number limitation
@ 2019-06-25  8:11 Mircea Caprioru
  2019-06-25  8:11 ` [PATCHi V4 2/5] iio: adc: ad7124: Add buffered input support Mircea Caprioru
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Mircea Caprioru @ 2019-06-25  8:11 UTC (permalink / raw)
  To: jic23
  Cc: Michael.Hennerich, stefan.popa, lars, gregkh, linux-kernel,
	linux-iio, devicetree, robh+dt, Mircea Caprioru

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 <mircea.caprioru@analog.com>
---

Changelog v2:
- nothing changed here

Changelog v3:
- nothing changed here

Changelog v4:
- nothing changed here

 drivers/iio/adc/ad7124.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index 659ef37d5fe8..810234db9c0d 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -462,13 +462,6 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev,
 		if (ret)
 			goto err;
 
-		if (ain[0] >= st->chip_info->num_inputs ||
-		    ain[1] >= st->chip_info->num_inputs) {
-			dev_err(indio_dev->dev.parent,
-				"Input pin number out of range.\n");
-			ret = -EINVAL;
-			goto err;
-		}
 		st->channel_config[channel].ain = AD7124_CHANNEL_AINP(ain[0]) |
 						  AD7124_CHANNEL_AINM(ain[1]);
 		st->channel_config[channel].bipolar =
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-06-26 19:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25  8:11 [PATCH V4 1/5] iio: adc: ad7124: Remove input number limitation Mircea Caprioru
2019-06-25  8:11 ` [PATCHi V4 2/5] iio: adc: ad7124: Add buffered input support Mircea Caprioru
2019-06-26 19:24   ` Jonathan Cameron
2019-06-25  8:11 ` [PATCH V4 3/5] iio: adc: ad7124: Shift to dynamic allocation for channel configuration Mircea Caprioru
2019-06-26 19:25   ` Jonathan Cameron
2019-06-25  8:11 ` [PATCH V4 4/5] dt-bindings: iio: adc: Convert ad7124 documentation to YAML Mircea Caprioru
2019-06-26 14:44   ` Rob Herring
2019-06-26 19:34     ` Jonathan Cameron
2019-06-26 19:57       ` Rob Herring
2019-06-25  8:11 ` [PATCH V4 5/5] dt-bindings: iio: adc: Add buffered input property Mircea Caprioru
2019-06-26 14:45   ` Rob Herring
2019-06-26 19:34     ` Jonathan Cameron
2019-06-26 19:22 ` [PATCH V4 1/5] iio: adc: ad7124: Remove input number limitation Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).