public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Andrej Valek <andy@skyrain.eu>, linux-iio@vger.kernel.org
Cc: Valek Andrej <andrej.v@skyrain.eu>,
	lars@metafoo.de, Michael.Hennerich@analog.com,
	puranjay@kernel.org, jonathan.cameron@huawei.com
Subject: Re: [PATCH] iio: accel: fix ADXL355 temperature signature value
Date: Sat, 14 Mar 2026 15:22:12 -0500	[thread overview]
Message-ID: <a2e56b5c-ef76-4a6a-9ffc-e8fe259a7153@baylibre.com> (raw)
In-Reply-To: <20260313092413.35912-1-andy@skyrain.eu>

On 3/13/26 4:24 AM, Andrej Valek wrote:
> From: "Valek Andrej <andrej.v@skyrain.eu>"
> 
> Temperature was wrongly represented as 12-bit signature, confirmed by DS.

signature == signed integer?

DS == datasheet?

> Even if the temperature is negative, the value in the register stays
> unsigned.

And IIO_CHAN_INFO_OFFSET will be negative.

> 
> Signed-off-by: Valek Andrej <andrej.v@skyrain.eu>
> ---
>  drivers/iio/accel/adxl355_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c
> index 1c1d64d5cbcb2..8f90c58f41008 100644
> --- a/drivers/iio/accel/adxl355_core.c
> +++ b/drivers/iio/accel/adxl355_core.c
> @@ -745,7 +745,7 @@ static const struct iio_chan_spec adxl355_channels[] = {
>  				      BIT(IIO_CHAN_INFO_OFFSET),
>  		.scan_index = 3,
>  		.scan_type = {
> -			.sign = 's',
> +			.sign = 'u',
>  			.realbits = 12,
>  			.storagebits = 16,
>  			.endianness = IIO_BE,



  reply	other threads:[~2026-03-14 20:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13  9:24 [PATCH] iio: accel: fix ADXL355 temperature signature value Andrej Valek
2026-03-14 20:22 ` David Lechner [this message]
2026-03-15 15:35   ` Andrej Valek
2026-03-15 16:18     ` David Lechner
2026-03-22 11:44       ` 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=a2e56b5c-ef76-4a6a-9ffc-e8fe259a7153@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andrej.v@skyrain.eu \
    --cc=andy@skyrain.eu \
    --cc=jonathan.cameron@huawei.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=puranjay@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