linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Iker Perez <iker.perez@codethink.co.uk>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (lm75) Fixup tmp75b clr_mask
Date: Thu, 1 Aug 2019 09:39:55 -0700	[thread overview]
Message-ID: <20190801163955.GA17675@roeck-us.net> (raw)
In-Reply-To: <20190801075324.4638-1-iker.perez@codethink.co.uk>

On Thu, Aug 01, 2019 at 08:53:24AM +0100, Iker Perez wrote:
> From: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
> 
> The configuration register of the tmp75b sensor is 16bit long, however
> the first byte is reserved, so there is not no need to take care of it.
> 
> Because the order of the bytes is little endian and it is only wanted to
> write one byte, the desired bits must be shifted in a 8 bit range.
> 
> Signed-off-by: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/lm75.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
> index 3fb9c0a2d6d0..ce5ec403ec73 100644
> --- a/drivers/hwmon/lm75.c
> +++ b/drivers/hwmon/lm75.c
> @@ -343,7 +343,7 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  		data->sample_time = MSEC_PER_SEC / 2;
>  		break;
>  	case tmp75b:  /* not one-shot mode, Conversion rate 37Hz */
> -		clr_mask |= 1 << 15 | 0x3 << 13;
> +		clr_mask |= 1 << 7 | 0x3 << 5;
>  		data->resolution = 12;
>  		data->sample_time = MSEC_PER_SEC / 37;
>  		break;

      reply	other threads:[~2019-08-01 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01  7:53 [PATCH] hwmon: (lm75) Fixup tmp75b clr_mask Iker Perez
2019-08-01 16:39 ` Guenter Roeck [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=20190801163955.GA17675@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=iker.perez@codethink.co.uk \
    --cc=linux-hwmon@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).