From: Jonathan Cameron <jic23@kernel.org>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Kent Gustavsson <kent@minoris.se>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: mcp3911: use correct id bits
Date: Sat, 15 Oct 2022 16:28:52 +0100 [thread overview]
Message-ID: <20221015162852.74d936fd@jic23-huawei> (raw)
In-Reply-To: <20221010194641.676484-1-marcus.folkesson@gmail.com>
On Mon, 10 Oct 2022 21:46:41 +0200
Marcus Folkesson <marcus.folkesson@gmail.com> wrote:
> The device ID should be shifted 6 bits to left according to datasheet.
>
> Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911")
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Applied to the the fixes-togreg branch of iio.git.
Thanks,
Jonathan
> ---
> drivers/iio/adc/mcp3911.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c
> index e55db02c534f..2c1af11a621f 100644
> --- a/drivers/iio/adc/mcp3911.c
> +++ b/drivers/iio/adc/mcp3911.c
> @@ -57,8 +57,8 @@
> /* Internal voltage reference in mV */
> #define MCP3911_INT_VREF_MV 1200
>
> -#define MCP3911_REG_READ(reg, id) ((((reg) << 1) | ((id) << 5) | (1 << 0)) & 0xff)
> -#define MCP3911_REG_WRITE(reg, id) ((((reg) << 1) | ((id) << 5) | (0 << 0)) & 0xff)
> +#define MCP3911_REG_READ(reg, id) ((((reg) << 1) | ((id) << 6) | (1 << 0)) & 0xff)
> +#define MCP3911_REG_WRITE(reg, id) ((((reg) << 1) | ((id) << 6) | (0 << 0)) & 0xff)
>
> #define MCP3911_NUM_CHANNELS 2
> #define MCP3911_NUM_SCALES 6
prev parent reply other threads:[~2022-10-15 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 19:46 [PATCH] iio: adc: mcp3911: use correct id bits Marcus Folkesson
2022-10-15 15:28 ` 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=20221015162852.74d936fd@jic23-huawei \
--to=jic23@kernel.org \
--cc=kent@minoris.se \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcus.folkesson@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