From: Robert Hancock <robert.hancock@calian.com>
To: linux-iio@vger.kernel.org
Cc: anand.ashok.dumbre@xilinx.com, jic23@kernel.org, lars@metafoo.de,
robh+dt@kernel.org, michal.simek@xilinx.com,
manish.narani@xilinx.com, devicetree@vger.kernel.org,
Robert Hancock <robert.hancock@calian.com>,
Michael Tretter <m.tretter@pengutronix.de>
Subject: [PATCH v2 2/4] iio: adc: xilinx-ams: Fixed missing PS channels
Date: Thu, 27 Jan 2022 11:34:48 -0600 [thread overview]
Message-ID: <20220127173450.3684318-3-robert.hancock@calian.com> (raw)
In-Reply-To: <20220127173450.3684318-1-robert.hancock@calian.com>
The code forgot to increment num_channels for the PS channel inputs,
resulting in them not being enabled as they should.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
---
drivers/iio/adc/xilinx-ams.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c
index 8343c5f74121..b93864362dac 100644
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -1224,6 +1224,7 @@ static int ams_init_module(struct iio_dev *indio_dev,
/* add PS channels to iio device channels */
memcpy(channels, ams_ps_channels, sizeof(ams_ps_channels));
+ num_channels = ARRAY_SIZE(ams_ps_channels);
} else if (fwnode_property_match_string(fwnode, "compatible",
"xlnx,zynqmp-ams-pl") == 0) {
ams->pl_base = fwnode_iomap(fwnode, 0);
--
2.31.1
next prev parent reply other threads:[~2022-01-27 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 17:34 [PATCH v2 0/4] Xilinx AMS fixes Robert Hancock
2022-01-27 17:34 ` [PATCH v2 1/4] dt-bindings: iio: adc: zynqmp_ams: Add clock entry Robert Hancock
2022-02-09 20:12 ` Rob Herring
2022-01-27 17:34 ` Robert Hancock [this message]
2022-01-27 17:34 ` [PATCH v2 3/4] iio: adc: xilinx-ams: Fixed wrong sequencer register settings Robert Hancock
2022-01-27 17:34 ` [PATCH v2 4/4] iio: adc: xilinx-ams: Fix single channel switching sequence Robert Hancock
2022-01-30 12:46 ` [PATCH v2 0/4] Xilinx AMS fixes Jonathan Cameron
2022-02-09 19:49 ` Robert Hancock
2022-02-26 16:45 ` Jonathan Cameron
2022-02-28 6:40 ` Michal Simek
2022-02-28 18:26 ` Jonathan Cameron
2022-03-01 7:34 ` Michal Simek
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=20220127173450.3684318-3-robert.hancock@calian.com \
--to=robert.hancock@calian.com \
--cc=anand.ashok.dumbre@xilinx.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=m.tretter@pengutronix.de \
--cc=manish.narani@xilinx.com \
--cc=michal.simek@xilinx.com \
--cc=robh+dt@kernel.org \
/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: link
Be 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.