From: Jonathan Cameron <jic23@kernel.org>
To: Angelo Dureghello <adureghello@baylibre.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alexandru Ardelean <aardelean@baylibre.com>,
David Lechner <dlechner@baylibre.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-fbdev@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Guillaume Stols <gstols@baylibre.com>
Subject: Re: [PATCH v3 03/10] iio: adc: ad7606: fix wrong scale available
Date: Sat, 1 Feb 2025 12:57:30 +0000 [thread overview]
Message-ID: <20250201125730.1794a852@jic23-huawei> (raw)
In-Reply-To: <20250129-wip-bl-ad7606_add_backend_sw_mode-v3-3-c3aec77c0ab7@baylibre.com>
On Wed, 29 Jan 2025 12:03:04 +0100
Angelo Dureghello <adureghello@baylibre.com> wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> Fix wrong scale available list since only one value is returned:
>
> ...
> iio:device1: ad7606b (buffer capable)
> 8 channels found:
> voltage0: (input, index: 0, format: le:S16/16>>0)
> 2 channel-specific attributes found:
> attr 0: scale value: 0.305176
> attr 1: scale_available value: 0.076293
> Fix as:
> voltage0: (input, index: 0, format: le:S16/16>>0)
> 2 channel-specific attributes found:
> attr 0: scale value: 0.305176
> attr 1: scale_available value: 0.076293 0.152588 0.305176
>
> Fixes: 97c6d857041d ("iio: adc: ad7606: rework scale-available to be static")
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Applied to the fixes-togreg branch of iio.git
Thanks,
Jonathan
> ---
> drivers/iio/adc/ad7606.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
> index d8e3c7a43678..d39354afd539 100644
> --- a/drivers/iio/adc/ad7606.c
> +++ b/drivers/iio/adc/ad7606.c
> @@ -1047,7 +1047,7 @@ static int ad7606_read_avail(struct iio_dev *indio_dev,
>
> cs = &st->chan_scales[ch];
> *vals = (int *)cs->scale_avail;
> - *length = cs->num_scales;
> + *length = cs->num_scales * 2;
> *type = IIO_VAL_INT_PLUS_MICRO;
>
> return IIO_AVAIL_LIST;
>
next prev parent reply other threads:[~2025-02-01 12:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 11:03 [PATCH v3 00/10] add support for Software mode on AD7606's iio backend driver Angelo Dureghello
2025-01-29 11:03 ` [PATCH v3 01/10] dt-bindings: iio: dac: adi-axi-adc: fix ad7606 pwm-names Angelo Dureghello
2025-01-29 16:43 ` Rob Herring (Arm)
2025-02-01 12:54 ` Jonathan Cameron
2025-01-29 11:03 ` [PATCH v3 02/10] dt-bindings: iio: dac: adi-axi-adc: add ad7606 variant Angelo Dureghello
2025-01-29 16:46 ` Rob Herring (Arm)
2025-01-29 11:03 ` [PATCH v3 03/10] iio: adc: ad7606: fix wrong scale available Angelo Dureghello
2025-02-01 12:57 ` Jonathan Cameron [this message]
2025-01-29 11:03 ` [PATCH v3 04/10] iio: adc: ad7606: move the software mode configuration Angelo Dureghello
2025-01-29 11:03 ` [PATCH v3 05/10] iio: adc: ad7606: move software functions into common file Angelo Dureghello
2025-01-29 11:03 ` [PATCH v3 06/10] iio: adc: adi-axi-adc: add platform children support Angelo Dureghello
2025-01-31 21:17 ` David Lechner
2025-01-29 11:03 ` [PATCH v3 07/10] iio: adc: adi-axi-adc: add support for AD7606 register writing Angelo Dureghello
2025-01-31 21:27 ` David Lechner
2025-02-01 13:07 ` Jonathan Cameron
2025-01-29 11:03 ` [PATCH v3 08/10] iio: adc: ad7606: change r/w_register signature Angelo Dureghello
2025-01-31 21:31 ` David Lechner
2025-02-01 12:53 ` Jonathan Cameron
2025-01-29 11:03 ` [PATCH v3 09/10] iio: adc: ad7606: change channel macros parameters Angelo Dureghello
2025-01-29 11:03 ` [PATCH v3 10/10] iio: adc: ad7606: add support for writing registers when using backend Angelo Dureghello
2025-02-01 13:14 ` Jonathan Cameron
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=20250201125730.1794a852@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=aardelean@baylibre.com \
--cc=adureghello@baylibre.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=gstols@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=robh@kernel.org \
/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