[PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name

Subsystems: analog devices inc iio drivers, iio subsystem and drivers, the rest

STALE1796d LANDED: 1 (0M)

Revision v6 of 2 in this series; 1 review trailer; landed in mainline as d9de0fbdeb01 on 2021-10-07.

2 messages, 2 authors, 2021-10-07 · open the first message on its own page

[PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name

From: Mihail Chindris <hidden>
Date: 2021-10-07 08:05:38

In the documentation the name for the property is
output-range-microvolts which is a standard name, therefore this name
must be used.

Fixes: fd9373e41b9ba ("iio: dac: ad5766: add driver support for AD5766")
Signed-off-by: Mihail Chindris <redacted>
Reviewed-by: Alexandru Ardelean <redacted>
---
 drivers/iio/dac/ad5766.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/dac/ad5766.c b/drivers/iio/dac/ad5766.c
index 3104ec32dfac..dafda84fdea3 100644
--- a/drivers/iio/dac/ad5766.c
+++ b/drivers/iio/dac/ad5766.c
@@ -503,13 +503,13 @@ static int ad5766_get_output_range(struct ad5766_state *st)
 	int i, ret, min, max, tmp[2];
 
 	ret = device_property_read_u32_array(&st->spi->dev,
-					     "output-range-voltage",
+					     "output-range-microvolts",
 					     tmp, 2);
 	if (ret)
 		return ret;
 
-	min = tmp[0] / 1000;
-	max = tmp[1] / 1000;
+	min = tmp[0] / 1000000;
+	max = tmp[1] / 1000000;
 	for (i = 0; i < ARRAY_SIZE(ad5766_span_tbl); i++) {
 		if (ad5766_span_tbl[i].min != min ||
 		    ad5766_span_tbl[i].max != max)
-- 
2.27.0

Re: [PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name

From: Jonathan Cameron <jic23@kernel.org>
Date: 2021-10-07 15:47:28

On Thu, 7 Oct 2021 08:00:34 +0000
Mihail Chindris [off-list ref] wrote:
In the documentation the name for the property is
output-range-microvolts which is a standard name, therefore this name
must be used.

Fixes: fd9373e41b9ba ("iio: dac: ad5766: add driver support for AD5766")
Signed-off-by: Mihail Chindris <redacted>
Reviewed-by: Alexandru Ardelean <redacted>
Applied this one to the fixes-togreg branch of iio.git and marked it for stable.

Thankfully this is (I think) far enough from the other changes that we
should be able to take the other patches through the togreg tree and have
them all meet up in linux-next / upstream.

Thanks,

Jonathan
quoted hunk
---
 drivers/iio/dac/ad5766.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/dac/ad5766.c b/drivers/iio/dac/ad5766.c
index 3104ec32dfac..dafda84fdea3 100644
--- a/drivers/iio/dac/ad5766.c
+++ b/drivers/iio/dac/ad5766.c
@@ -503,13 +503,13 @@ static int ad5766_get_output_range(struct ad5766_state *st)
 	int i, ret, min, max, tmp[2];
 
 	ret = device_property_read_u32_array(&st->spi->dev,
-					     "output-range-voltage",
+					     "output-range-microvolts",
 					     tmp, 2);
 	if (ret)
 		return ret;
 
-	min = tmp[0] / 1000;
-	max = tmp[1] / 1000;
+	min = tmp[0] / 1000000;
+	max = tmp[1] / 1000000;
 	for (i = 0; i < ARRAY_SIZE(ad5766_span_tbl); i++) {
 		if (ad5766_span_tbl[i].min != min ||
 		    ad5766_span_tbl[i].max != max)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help