Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: light: bu27008: Fix intensity data type
Date: Sat, 17 Jun 2023 20:35:14 +0100	[thread overview]
Message-ID: <20230617203514.60436177@jic23-huawei> (raw)
In-Reply-To: <240a7ca5fc1b76da20d81f930d00f31a54b1fdf8.1686648422.git.mazziesaccount@gmail.com>

On Tue, 13 Jun 2023 12:35:12 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> The intensity data from bu27008 is unsigned. The type of the scan data
> was incorrectly marked as signed resulting large intensity values to be
> interpreted as negative ones.
> 
> Fix the scan data type.
> 
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Applied series to the fixes-togreg branch of iio.git (which now includes
this as it's upstream in char-misc-next)  Added fixes tags where needed given
the ids are now stable

Thanks,
Jonathan

> 
> ---
> Fixes tag not added because AFACS the bu27008 is not yet in any releases.
> ---
>  drivers/iio/light/rohm-bu27008.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/rohm-bu27008.c b/drivers/iio/light/rohm-bu27008.c
> index 80eb14ea8193..b50bf8973d9a 100644
> --- a/drivers/iio/light/rohm-bu27008.c
> +++ b/drivers/iio/light/rohm-bu27008.c
> @@ -190,7 +190,7 @@ static const struct iio_itime_sel_mul bu27008_itimes[] = {
>  	.address = BU27008_REG_##data##_LO,					\
>  	.scan_index = BU27008_##color,						\
>  	.scan_type = {								\
> -		.sign = 's',							\
> +		.sign = 'u',							\
>  		.realbits = 16,							\
>  		.storagebits = 16,						\
>  		.endianness = IIO_LE,						\


      reply	other threads:[~2023-06-17 19:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  9:34 [PATCH 0/3] ROHM BUxxx light sensor fixes Matti Vaittinen
2023-06-13  9:34 ` [PATCH 1/3] iio: light: bu27034: Fix scale format Matti Vaittinen
2023-06-17 19:30   ` Jonathan Cameron
2023-06-13  9:34 ` [PATCH 2/3] iio: light: bu27008: " Matti Vaittinen
2023-06-13  9:35 ` [PATCH 3/3] iio: light: bu27008: Fix intensity data type Matti Vaittinen
2023-06-17 19:35   ` Jonathan Cameron [this message]

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=20230617203514.60436177@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    /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