From: Jonathan Cameron <jic23@kernel.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: lars@metafoo.de, andy.shevchenko@gmail.com,
linux-iio@vger.kernel.org, <Eugen.Hristev@microchip.com>
Subject: Re: [PATCH v2 08/13] iio: at91-sama5d2: Use scan_type when processing raw data
Date: Sat, 13 Nov 2021 16:42:01 +0000 [thread overview]
Message-ID: <20211113164201.60644fc4@jic23-huawei> (raw)
In-Reply-To: <20211104082413.3681212-9-gwendal@chromium.org>
On Thu, 4 Nov 2021 01:24:08 -0700
Gwendal Grignou <gwendal@chromium.org> wrote:
> Use channel definition as root of trust and replace constant
> when reading elements directly using the raw sysfs attributes.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Hi Eugen,
Gwendal's v2 crossed with your comments on this fixing an issue in
6794e23fa3fe ("iio: adc: at91-sama5d2_adc: add support for oversampling
resolution")
You requested a separate fix to change the value to 13 then this on top
of that. I don't see why we can't go directly to this with an appropriately
reworded message to say what is being fixed. Am I missing something beyond
the fix being more obvious if we just change the value?
Whilst this is pending I've applied the rest of this series as it's only this
one with open questions.
Thanks,
Jonathan
> ---
> drivers/iio/adc/at91-sama5d2_adc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index 4c922ef634f8e..92a57cf10fba4 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -1586,7 +1586,8 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
> *val = st->conversion_value;
> ret = at91_adc_adjust_val_osr(st, val);
> if (chan->scan_type.sign == 's')
> - *val = sign_extend32(*val, 11);
> + *val = sign_extend32(*val,
> + chan->scan_type.realbits - 1);
> st->conversion_done = false;
> }
>
next prev parent reply other threads:[~2021-11-13 16:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 8:24 [PATCH v2 00/13] iio: Use scan_type shift and realbits when processing raw data Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 01/13] iio: bma220: Use scan_type " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 02/13] iio: kxcjk-1013: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 03/13] iio: mma7455: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 04/13] iio: sca3000: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 05/13] iio: stk8312: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 06/13] iio: stk8ba50: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 07/13] iio: ad7266: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 08/13] iio: at91-sama5d2: " Gwendal Grignou
2021-11-13 16:42 ` Jonathan Cameron [this message]
2021-11-15 9:22 ` Eugen.Hristev
2021-11-21 13:45 ` Jonathan Cameron
2021-11-04 8:24 ` [PATCH v2 09/13] iio: ti-adc12138: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 10/13] iio: mag3110: " Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 11/13] iio: ti-ads1015: Remove shift variable ads1015_read_raw Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 12/13] iio: xilinx-xadc-core: Use local variable in xadc_read_raw Gwendal Grignou
2021-11-04 8:24 ` [PATCH v2 13/13] iio: mpl3115: Use scan_type.shift and realbit in mpl3115_read_raw Gwendal Grignou
2021-11-13 16:43 ` [PATCH v2 00/13] iio: Use scan_type shift and realbits when processing raw data 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=20211113164201.60644fc4@jic23-huawei \
--to=jic23@kernel.org \
--cc=Eugen.Hristev@microchip.com \
--cc=andy.shevchenko@gmail.com \
--cc=gwendal@chromium.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.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