public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Andrej Valek <andrej.v@skyrain.eu>, linux-iio@vger.kernel.org
Cc: 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: Sun, 15 Mar 2026 11:18:18 -0500	[thread overview]
Message-ID: <16d93b99-00a0-4cc3-909f-26aba8082af6@baylibre.com> (raw)
In-Reply-To: <25c766b7-d66a-4638-9995-b5936ca87b7a@skyrain.eu>

On 3/15/26 10:35 AM, Andrej Valek wrote:
> Ah, I see, I described it wrongly.
> 
> On 14.03.2026 21:22, David Lechner wrote:
>> 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?
> Correct, temperature is wrongly represented as signed 12-bit number, while it has to be unsigned.
>>
>> DS == datasheet?
> Yes
>>
>>> Even if the temperature is negative, the value in the register stays
>>> unsigned.
>> And IIO_CHAN_INFO_OFFSET will be negative.
> Not sure what do you mean by this. I can only say, that output type was "be:s12/16>>0" and should be "be:u12/16>>0". So when some upper layer wanted to represent the number it "overflowed", while the bits have been masked.

Mostly I was talking to myself on this point. No action is needed here.

>>
>>> 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,
>>
>>
> Conclusion = Should I send a new version with "fixed" description?

Sometimes, for small tweaks, Jonathan will just fix it while applying the
patch. So wait for for his feedback.

You can also see the status of the patch in patchwork at [1]. If the State
changes to "Changes requested", then you know a new version is expected.
Right now, it says "New" which means he hasn't looked at it or made a
decision yet.


[1]: https://patchwork.kernel.org/project/linux-iio/patch/20260313092413.35912-1-andy@skyrain.eu/

> 
> BR,
> Andy


  reply	other threads:[~2026-03-15 16:18 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
2026-03-15 15:35   ` Andrej Valek
2026-03-15 16:18     ` David Lechner [this message]
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=16d93b99-00a0-4cc3-909f-26aba8082af6@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andrej.v@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