From: Marc Titinger <mtitinger@baylibre.com>
To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Marc Titinger <mtitinger@baylibre.com>
Subject: [PATCH] iio: ina2xx: fix channel order in software buffer
Date: Tue, 15 Dec 2015 16:26:22 +0100 [thread overview]
Message-ID: <1450193182-18179-1-git-send-email-mtitinger@baylibre.com> (raw)
In-Reply-To: <566C5613.3040101@kernel.org>
POWER and CURRENT were swapped out in the buffer:
was current2 and power3, correct order is power2 and current3.
Signed-off-by: Marc Titinger <mtitinger@baylibre.com>
---
Hi Jon,
we just found this while testing with the buffered mode.
My apologies for missing this bug ealier.
Cheers,
Marc.
---
drivers/iio/adc/ina2xx-adc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
index 98939ba..91e1f2b 100644
--- a/drivers/iio/adc/ina2xx-adc.c
+++ b/drivers/iio/adc/ina2xx-adc.c
@@ -427,8 +427,8 @@ static ssize_t ina2xx_shunt_resistor_store(struct device *dev,
static const struct iio_chan_spec ina2xx_channels[] = {
INA2XX_CHAN_VOLTAGE(0, INA2XX_SHUNT_VOLTAGE),
INA2XX_CHAN_VOLTAGE(1, INA2XX_BUS_VOLTAGE),
- INA2XX_CHAN(IIO_CURRENT, 2, INA2XX_CURRENT),
- INA2XX_CHAN(IIO_POWER, 3, INA2XX_POWER),
+ INA2XX_CHAN(IIO_POWER, 2, INA2XX_POWER),
+ INA2XX_CHAN(IIO_CURRENT, 3, INA2XX_CURRENT),
IIO_CHAN_SOFT_TIMESTAMP(4),
};
--
1.9.1
next prev parent reply other threads:[~2015-12-15 15:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 9:09 [PATCH v3 0/2] IIO version of INA2xx Marc Titinger
2015-12-07 9:09 ` [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors Marc Titinger
2015-12-12 17:14 ` Jonathan Cameron
2015-12-15 15:26 ` Marc Titinger [this message]
2015-12-19 15:07 ` [PATCH] iio: ina2xx: fix channel order in software buffer Jonathan Cameron
2015-12-16 17:45 ` [PATCH v3 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors Andrew F. Davis
2015-12-16 17:54 ` Marc Titinger
2015-12-16 18:09 ` Andrew F. Davis
2015-12-07 9:09 ` [PATCH v3 2/2] iio: ina2xx: provide a sysfs parameter to allow async readout of the ADCs Marc Titinger
2015-12-12 15:56 ` Jonathan Cameron
2015-12-14 11:01 ` [PATCH] iio: ina2xx: add ABI documentation entry sysfs-bus-iio-ina2xx-adc Marc Titinger
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=1450193182-18179-1-git-send-email-mtitinger@baylibre.com \
--to=mtitinger@baylibre.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox