linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/2] iio:magnetometer:mag3110: Fix initialization of ctrl_reg1
Date: Sat, 03 May 2014 11:27:28 +0100	[thread overview]
Message-ID: <5364C490.20805@kernel.org> (raw)
In-Reply-To: <1399018187-29742-2-git-send-email-pmeerw@pmeerw.net>

On 02/05/14 09:09, Peter Meerwald wrote:
> DR bits need to be shifted; since MAG3110_CTRL_DR_DEFAULT is
> zero, the change has no effect
>
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Gah, my careful colour coding of patches went astray on these two so I
lost them.  Thanks for the reminder.

Applied to the togreg branch of iio.git

J
> ---
>   drivers/iio/magnetometer/mag3110.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/magnetometer/mag3110.c b/drivers/iio/magnetometer/mag3110.c
> index 8b77782..1b2df75 100644
> --- a/drivers/iio/magnetometer/mag3110.c
> +++ b/drivers/iio/magnetometer/mag3110.c
> @@ -338,7 +338,7 @@ static int mag3110_probe(struct i2c_client *client,
>   	indio_dev->num_channels = ARRAY_SIZE(mag3110_channels);
>   	indio_dev->available_scan_masks = mag3110_scan_masks;
>
> -	data->ctrl_reg1 = MAG3110_CTRL_DR_DEFAULT;
> +	data->ctrl_reg1 = MAG3110_CTRL_DR_DEFAULT << MAG3110_CTRL_DR_SHIFT;
>   	ret = i2c_smbus_write_byte_data(client, MAG3110_CTRL_REG1,
>   		data->ctrl_reg1);
>   	if (ret < 0)
>


  reply	other threads:[~2014-05-03 10:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02  8:09 [PATCH 0/2] iio:magnetometer:mag3110, missing patches Peter Meerwald
2014-05-02  8:09 ` [PATCH 1/2] iio:magnetometer:mag3110: Fix initialization of ctrl_reg1 Peter Meerwald
2014-05-03 10:27   ` Jonathan Cameron [this message]
2014-05-02  8:09 ` [PATCH 2/2] iio:magnetometer:mag3110: Enable user offset calibration Peter Meerwald
2014-05-03 10:28   ` Jonathan Cameron

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=5364C490.20805@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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).