From: Mircea Caprioru <mircea.caprioru@analog.com> To: <jic23@kernel.org> Cc: <Michael.Hennerich@analog.com>, <stefan.popa@analog.com>, <lars@metafoo.de>, <gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>, <robh+dt@kernel.org>, Mircea Caprioru <mircea.caprioru@analog.com> Subject: [RESEND PATCH 1/4] iio: adc: ad7124: Remove input number limitation Date: Thu, 20 Jun 2019 12:34:49 +0300 [thread overview] Message-ID: <20190620093452.12891-1-mircea.caprioru@analog.com> (raw) 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> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Mircea Caprioru <mircea.caprioru@analog.com> To: jic23@kernel.org Cc: Michael.Hennerich@analog.com, stefan.popa@analog.com, lars@metafoo.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, Mircea Caprioru <mircea.caprioru@analog.com> Subject: [RESEND PATCH 1/4] iio: adc: ad7124: Remove input number limitation Date: Thu, 20 Jun 2019 12:34:49 +0300 [thread overview] Message-ID: <20190620093452.12891-1-mircea.caprioru@analog.com> (raw) 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> --- 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
next reply other threads:[~2019-06-20 9:35 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-20 9:34 Mircea Caprioru [this message] 2019-06-20 9:34 ` [RESEND PATCH 1/4] iio: adc: ad7124: Remove input number limitation Mircea Caprioru 2019-06-20 9:42 Mircea Caprioru 2019-06-20 9:42 ` Mircea Caprioru
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190620093452.12891-1-mircea.caprioru@analog.com \ --to=mircea.caprioru@analog.com \ --cc=Michael.Hennerich@analog.com \ --cc=devicetree@vger.kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=jic23@kernel.org \ --cc=lars@metafoo.de \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=robh+dt@kernel.org \ --cc=stefan.popa@analog.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.