devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/6] iio: adc: mp2629: fix wrong comparison of channel
@ 2022-06-14 19:42 Saravanan Sekar
  2022-06-14 19:42 ` [PATCH v2 2/6] dt-bindings: mfd: Add mp2733 compatible Saravanan Sekar
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Saravanan Sekar @ 2022-06-14 19:42 UTC (permalink / raw)
  To: sre, lee.jones, robh+dt, krzysztof.kozlowski+dt, jic23, lars,
	andy.shevchenko
  Cc: linux-pm, devicetree, linux-iio, Saravanan Sekar

Input voltage channel enum is compared against iio address instead
of channel.

Fixes: 7abd9fb64682 ("iio: adc: mp2629: Add support for mp2629 ADC driver")
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
---
 drivers/iio/adc/mp2629_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/mp2629_adc.c b/drivers/iio/adc/mp2629_adc.c
index aca084f1e78a..e7fbfe92e884 100644
--- a/drivers/iio/adc/mp2629_adc.c
+++ b/drivers/iio/adc/mp2629_adc.c
@@ -73,7 +73,7 @@ static int mp2629_read_raw(struct iio_dev *indio_dev,
 		if (ret)
 			return ret;
 
-		if (chan->address == MP2629_INPUT_VOLT)
+		if (chan->channel == MP2629_INPUT_VOLT)
 			rval &= GENMASK(6, 0);
 		*val = rval;
 		return IIO_VAL_INT;
-- 
2.25.1


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

end of thread, other threads:[~2022-06-15  9:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-14 19:42 [PATCH v2 1/6] iio: adc: mp2629: fix wrong comparison of channel Saravanan Sekar
2022-06-14 19:42 ` [PATCH v2 2/6] dt-bindings: mfd: Add mp2733 compatible Saravanan Sekar
2022-06-14 20:48   ` Krzysztof Kozlowski
2022-06-15  1:28   ` Rob Herring
2022-06-14 19:42 ` [PATCH v2 3/6] mfd: mp2629: Add support for mps mp2733 battery charger Saravanan Sekar
2022-06-15  9:47   ` Andy Shevchenko
2022-06-14 19:42 ` [PATCH v2 4/6] iio: adc: mp2629: restrict input voltage mask for mp2629 Saravanan Sekar
2022-06-15  9:48   ` Andy Shevchenko
2022-06-14 19:42 ` [PATCH v2 5/6] power: supply: Add support for mp2733 battery charger Saravanan Sekar
2022-06-14 19:42 ` [PATCH v2 6/6] power: supply: mp2629: Add usb fast charge settings Saravanan Sekar
2022-06-15  9:51   ` Andy Shevchenko
2022-06-15  9:53 ` [PATCH v2 1/6] iio: adc: mp2629: fix wrong comparison of channel Andy Shevchenko

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).