From: Cosmin Tanislav <demonsingur@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: cosmin.tanislav@analog.com, Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits
Date: Sat, 15 Jan 2022 20:54:06 +0200 [thread overview]
Message-ID: <e8172ace-035b-b847-cc5c-90fb4d2ece43@gmail.com> (raw)
In-Reply-To: <20220115185615.403ee183@jic23-huawei>
On 1/15/22 20:56, Jonathan Cameron wrote:
> On Wed, 12 Jan 2022 22:00:36 +0200
> Cosmin Tanislav <demonsingur@gmail.com> wrote:
>
>> According to page 90 of the datasheet [1], AIN_BUFP is bit 6 and
>> AIN_BUFM is bit 5 of the CONFIG_0 -> CONFIG_7 registers.
>>
>> Fix the mask used for setting these bits.
>>
>> [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7124-8.pdf
>>
>> Fixes: 0eaecea6e487 ("iio: adc: ad7124: Add buffered input support")
>> Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
> Curious that didn't cause problems anyone noticed before. Ah well.
>
I only noticed it because I'm writing a driver for a similar device,
it was not even reported by anyone.
> Applied to the fixes-togreg branch of iio.git and marked for stable.
>
> Note that branch will probably be rebased after rc1 as I have some
> other things that need rc1 which will be in same pull request.
>
> Jonathan
>
>> ---
>> drivers/iio/adc/ad7124.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
>> index e45c600fccc0..18c154afbd7a 100644
>> --- a/drivers/iio/adc/ad7124.c
>> +++ b/drivers/iio/adc/ad7124.c
>> @@ -76,7 +76,7 @@
>> #define AD7124_CONFIG_REF_SEL(x) FIELD_PREP(AD7124_CONFIG_REF_SEL_MSK, x)
>> #define AD7124_CONFIG_PGA_MSK GENMASK(2, 0)
>> #define AD7124_CONFIG_PGA(x) FIELD_PREP(AD7124_CONFIG_PGA_MSK, x)
>> -#define AD7124_CONFIG_IN_BUFF_MSK GENMASK(7, 6)
>> +#define AD7124_CONFIG_IN_BUFF_MSK GENMASK(6, 5)
>> #define AD7124_CONFIG_IN_BUFF(x) FIELD_PREP(AD7124_CONFIG_IN_BUFF_MSK, x)
>>
>> /* AD7124_FILTER_X */
>
prev parent reply other threads:[~2022-01-15 18:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 20:00 [PATCH] iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits Cosmin Tanislav
2022-01-15 18:56 ` Jonathan Cameron
2022-01-15 18:54 ` Cosmin Tanislav [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=e8172ace-035b-b847-cc5c-90fb4d2ece43@gmail.com \
--to=demonsingur@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=cosmin.tanislav@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).