From: Jonathan Cameron <jic23@kernel.org>
To: Angelo Dureghello <adureghello@baylibre.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Beniamin Bia" <beniamin.bia@analog.com>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7606_spi: fix reg write value mask
Date: Sun, 4 May 2025 15:54:28 +0100 [thread overview]
Message-ID: <20250504155428.5056519d@jic23-huawei> (raw)
In-Reply-To: <upz2umlx6qjnfiw5wvheukvfvolvea4anq7hky2vz5yi2w5wea@ormxyycioexv>
On Tue, 29 Apr 2025 10:34:14 +0200
Angelo Dureghello <adureghello@baylibre.com> wrote:
> On 28.04.2025 20:55, David Lechner wrote:
> > Fix incorrect value mask for register write. Register values are 8-bit,
> > not 9. If this function was called with a value > 0xFF and an even addr,
> > it would cause writing to the next register.
> >
> > Fixes: f2a22e1e172f ("iio: adc: ad7606: Add support for software mode for ad7616")
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
Applied and marked for stable.
> > ---
> > drivers/iio/adc/ad7606_spi.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c
> > index bd05357a542cf7234d5bb6b718829d6b720262cd..6c1228c7b1b11058cb5186513f032f7c8c8aa8f4 100644
> > --- a/drivers/iio/adc/ad7606_spi.c
> > +++ b/drivers/iio/adc/ad7606_spi.c
> > @@ -127,7 +127,7 @@ static int ad7606_spi_reg_write(struct ad7606_state *st,
> > struct spi_device *spi = to_spi_device(st->dev);
> >
> > st->d16[0] = cpu_to_be16((st->bops->rd_wr_cmd(addr, 1) << 8) |
> > - (val & 0x1FF));
> > + (val & 0xFF));
> >
> > return spi_write(spi, &st->d16[0], sizeof(st->d16[0]));
> > }
> >
> > ---
> > base-commit: aa1bd0b0ad048855d9efbee4ee8b9a6eee536256
> > change-id: 20250428-iio-adc-ad7606_spi-fix-write-value-mask-7acdcca46227
>
> Reviewed-by: Angelo Dureghello <adureghello@baylibre.com>
>
> >
> > Best regards,
> > --
> > David Lechner <dlechner@baylibre.com>
> >
>
prev parent reply other threads:[~2025-05-04 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 1:55 David Lechner
2025-04-29 8:34 ` Angelo Dureghello
2025-05-04 14:54 ` 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=20250504155428.5056519d@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=adureghello@baylibre.com \
--cc=andy@kernel.org \
--cc=beniamin.bia@analog.com \
--cc=dlechner@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@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
all inboxes | Powered by JetHome®