]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
iio: adc: xilinx-ams: Fixed wrong sequencer register settings
authorRobert Hancock <robert.hancock@calian.com>
Thu, 27 Jan 2022 17:34:49 +0000 (11:34 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:15 +0000 (13:57 +0200)
commit d5d786fb531697be74c567b3844c6897ddf1ffdd upstream.

Register settings used for the sequencer configuration register
were incorrect, causing some inputs to not be read properly.

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>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-4-robert.hancock@calian.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/xilinx-ams.c

index 4edc265ae250eeaa84f3ee04a817c05bc14a4a99..7bf097fa10cb70cabbdbab87207e74a0b2350c65 100644 (file)
@@ -91,8 +91,8 @@
 
 #define AMS_CONF1_SEQ_MASK             GENMASK(15, 12)
 #define AMS_CONF1_SEQ_DEFAULT          FIELD_PREP(AMS_CONF1_SEQ_MASK, 0)
-#define AMS_CONF1_SEQ_CONTINUOUS       FIELD_PREP(AMS_CONF1_SEQ_MASK, 1)
-#define AMS_CONF1_SEQ_SINGLE_CHANNEL   FIELD_PREP(AMS_CONF1_SEQ_MASK, 2)
+#define AMS_CONF1_SEQ_CONTINUOUS       FIELD_PREP(AMS_CONF1_SEQ_MASK, 2)
+#define AMS_CONF1_SEQ_SINGLE_CHANNEL   FIELD_PREP(AMS_CONF1_SEQ_MASK, 3)
 
 #define AMS_REG_SEQ0_MASK              GENMASK(15, 0)
 #define AMS_REG_SEQ2_MASK              GENMASK(21, 16)