Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: <michael.hennerich@analog.com>
Cc: <lars@metafoo.de>, <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: dac: ad5446: Fix read_raw not returning set value
Date: Sun, 10 Apr 2022 17:45:39 +0100	[thread overview]
Message-ID: <20220410174539.0fb10e34@jic23-huawei> (raw)
In-Reply-To: <20220406105620.1171340-1-michael.hennerich@analog.com>

On Wed, 6 Apr 2022 12:56:20 +0200
<michael.hennerich@analog.com> wrote:

> From: Michael Hennerich <michael.hennerich@analog.com>
> 
> read_raw should return the un-scaled value.
> 
> Fixes: 5e06bdfb46e8b ("staging:iio:dac:ad5446: Return cached value for 'raw' attribute")
Fixes tags are part of the main tag block, so no blank line here.
> 
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>

Applied to the fixes-togreg branch of iio.git and marked for stable.
> ---
>  drivers/iio/dac/ad5446.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
> index 14cfabacbea5..fdf824041497 100644
> --- a/drivers/iio/dac/ad5446.c
> +++ b/drivers/iio/dac/ad5446.c
> @@ -178,7 +178,7 @@ static int ad5446_read_raw(struct iio_dev *indio_dev,
>  
>  	switch (m) {
>  	case IIO_CHAN_INFO_RAW:
> -		*val = st->cached_val;
> +		*val = st->cached_val >> chan->scan_type.shift;
>  		return IIO_VAL_INT;
>  	case IIO_CHAN_INFO_SCALE:
>  		*val = st->vref_mv;


      parent reply	other threads:[~2022-04-10 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 10:56 [PATCH] iio: dac: ad5446: Fix read_raw not returning set value michael.hennerich
2022-04-07  9:10 ` Sa, Nuno
2022-04-10 16:45 ` 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=20220410174539.0fb10e34@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.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