Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 84f77a94 authored by Maxime Roussin-Bélanger's avatar Maxime Roussin-Bélanger Committed by Greg Kroah-Hartman
Browse files

iio: si1133: read 24-bit signed integer for measurement



commit 328b50e9a0ad1fe8accdf8c19923deebab5e0c01 upstream.

The chip is configured in 24 bit mode. The values read from
it must always be treated as is. This fixes the issue by
replacing the previous 16 bits value by a 24 bits buffer.

This changes affects the value output by previous version of
the driver, since the least significant byte was missing.
The upper half of 16 bit values previously output are now
the upper half of a 24 bit value.

Fixes: e01e7eaf ("iio: light: introduce si1133")

Reported-by: default avatarSimon Goyette <simon.goyette@gmail.com>
Co-authored-by: default avatarGuillaume Champagne <champagne.guillaume.c@gmail.com>
Signed-off-by: default avatarMaxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: default avatarGuillaume Champagne <champagne.guillaume.c@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b24ff9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment