* [PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name [not found] <20211007080035.2531-1-mihail.chindris@analog.com> @ 2021-10-07 8:00 ` Mihail Chindris 2021-10-07 15:51 ` Jonathan Cameron 2021-10-07 8:00 ` [PATCH v6 5/6] Documentation:devicetree:bindings:iio:dac: Fix val Mihail Chindris 1 sibling, 1 reply; 4+ messages in thread From: Mihail Chindris @ 2021-10-07 8:00 UTC (permalink / raw) To: linux-kernel, linux-iio Cc: lars, Michael.Hennerich, jic23, nuno.sa, dragos.bogdan, alexandru.ardelean, Mihail Chindris, robh+dt, devicetree, Alexandru Ardelean 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 <mihail.chindris@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> --- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name 2021-10-07 8:00 ` [PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name Mihail Chindris @ 2021-10-07 15:51 ` Jonathan Cameron 0 siblings, 0 replies; 4+ messages in thread From: Jonathan Cameron @ 2021-10-07 15:51 UTC (permalink / raw) To: Mihail Chindris Cc: linux-kernel, linux-iio, lars, Michael.Hennerich, nuno.sa, dragos.bogdan, alexandru.ardelean, robh+dt, devicetree, Alexandru Ardelean On Thu, 7 Oct 2021 08:00:34 +0000 Mihail Chindris <mihail.chindris@analog.com> 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 <mihail.chindris@analog.com> > Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> 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 > --- > 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) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v6 5/6] Documentation:devicetree:bindings:iio:dac: Fix val [not found] <20211007080035.2531-1-mihail.chindris@analog.com> 2021-10-07 8:00 ` [PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name Mihail Chindris @ 2021-10-07 8:00 ` Mihail Chindris 2021-10-07 15:53 ` Jonathan Cameron 1 sibling, 1 reply; 4+ messages in thread From: Mihail Chindris @ 2021-10-07 8:00 UTC (permalink / raw) To: linux-kernel, linux-iio Cc: lars, Michael.Hennerich, jic23, nuno.sa, dragos.bogdan, alexandru.ardelean, Mihail Chindris, devicetree, Rob Herring, Alexandru Ardelean A correct value for output-range-microvolts is -5 to 5 Volts not -5 to 5 milivolts Fixes: e904cc899293f ("dt-bindings: iio: dac: AD5766 yaml documentation") Signed-off-by: Mihail Chindris <mihail.chindris@analog.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> --- Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml index d5c54813ce87..a8f7720d1e3e 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml @@ -54,7 +54,7 @@ examples: ad5766@0 { compatible = "adi,ad5766"; - output-range-microvolts = <(-5000) 5000>; + output-range-microvolts = <(-5000000) 5000000>; reg = <0>; spi-cpol; spi-max-frequency = <1000000>; -- 2.27.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v6 5/6] Documentation:devicetree:bindings:iio:dac: Fix val 2021-10-07 8:00 ` [PATCH v6 5/6] Documentation:devicetree:bindings:iio:dac: Fix val Mihail Chindris @ 2021-10-07 15:53 ` Jonathan Cameron 0 siblings, 0 replies; 4+ messages in thread From: Jonathan Cameron @ 2021-10-07 15:53 UTC (permalink / raw) To: Mihail Chindris Cc: linux-kernel, linux-iio, lars, Michael.Hennerich, nuno.sa, dragos.bogdan, alexandru.ardelean, devicetree, Rob Herring, Alexandru Ardelean On Thu, 7 Oct 2021 08:00:36 +0000 Mihail Chindris <mihail.chindris@analog.com> wrote: > A correct value for output-range-microvolts is -5 to 5 Volts > not -5 to 5 milivolts > > Fixes: e904cc899293f ("dt-bindings: iio: dac: AD5766 yaml documentation") > Signed-off-by: Mihail Chindris <mihail.chindris@analog.com> > Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Whilst it's only a trivial fix to an example it seems to me a worthwhile thing to backport and avoid people using old trees seeing the wrong example Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > --- > Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml > index d5c54813ce87..a8f7720d1e3e 100644 > --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5766.yaml > @@ -54,7 +54,7 @@ examples: > > ad5766@0 { > compatible = "adi,ad5766"; > - output-range-microvolts = <(-5000) 5000>; > + output-range-microvolts = <(-5000000) 5000000>; > reg = <0>; > spi-cpol; > spi-max-frequency = <1000000>; ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-07 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211007080035.2531-1-mihail.chindris@analog.com>
2021-10-07 8:00 ` [PATCH v6 4/6] drivers: iio: dac: ad5766: Fix dt property name Mihail Chindris
2021-10-07 15:51 ` Jonathan Cameron
2021-10-07 8:00 ` [PATCH v6 5/6] Documentation:devicetree:bindings:iio:dac: Fix val Mihail Chindris
2021-10-07 15:53 ` Jonathan Cameron
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).