From: Guenter Roeck <linux@roeck-us.net>
To: Dan Robertson <dan@dlrobertson.com>
Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>
Subject: Re: [PATCH 2/2] hwmon: (shtc1) fix shtc1 and shtw1 id mask
Date: Tue, 10 Sep 2019 11:43:52 -0700 [thread overview]
Message-ID: <20190910184352.GA29644@roeck-us.net> (raw)
In-Reply-To: <20190905014554.21658-3-dan@dlrobertson.com>
On Thu, Sep 05, 2019 at 01:45:54AM +0000, Dan Robertson wrote:
> Fix an error in the bitmaskfor the shtc1 and shtw1 bitmask used to
> retrieve the chip ID from the ID register. See section 5.7 of the shtw1
> or shtc1 datasheet for details.
>
> Fixes: 1a539d372edd9832444e7a3daa710c444c014dc9 ("hwmon: add support for Sensirion SHTC1 sensor")
> Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Applied after reordering and adjusting. The fix should come first,
followed by adding support for the new chip.
Thanks,
Guenter
> ---
> drivers/hwmon/shtc1.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/shtc1.c b/drivers/hwmon/shtc1.c
> index 3e9a859a2b58..c628313a20d4 100644
> --- a/drivers/hwmon/shtc1.c
> +++ b/drivers/hwmon/shtc1.c
> @@ -27,14 +27,14 @@ static const unsigned char shtc1_cmd_measure_nonblocking_lpm[] = { 0x60, 0x9c };
> static const unsigned char shtc1_cmd_read_id_reg[] = { 0xef, 0xc8 };
>
> /* constants for reading the ID register
> - * SHTC1: 0x0007 with mask 0x001f
> - * SHTW1: 0x0007 with mask 0x001f
> + * SHTC1: 0x0007 with mask 0x003f
> + * SHTW1: 0x0007 with mask 0x003f
> * SHTC3: 0x0807 with mask 0x083f
> */
> #define SHTC3_ID 0x0807
> #define SHTC3_ID_MASK 0x083f
> #define SHTC1_ID 0x0007
> -#define SHTC1_ID_MASK 0x001f
> +#define SHTC1_ID_MASK 0x003f
>
> /* delays for non-blocking i2c commands, both in us */
> #define SHTC1_NONBLOCKING_WAIT_TIME_HPM 14400
next prev parent reply other threads:[~2019-09-10 18:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 1:01 [PATCH 0/1] hwmon: (shtc1) add support for the SHTC3 sensor Dan Robertson
2019-09-05 1:01 ` [PATCH] " Dan Robertson
2019-09-05 1:45 ` [PATCH 0/2] " Dan Robertson
2019-09-05 1:45 ` [PATCH 1/2] " Dan Robertson
2019-09-10 18:14 ` Guenter Roeck
2019-09-05 1:45 ` [PATCH 2/2] hwmon: (shtc1) fix shtc1 and shtw1 id mask Dan Robertson
2019-09-10 18:43 ` Guenter Roeck [this message]
2019-09-10 18:57 ` Dan Robertson
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=20190910184352.GA29644@roeck-us.net \
--to=linux@roeck-us.net \
--cc=dan@dlrobertson.com \
--cc=jdelvare@suse.com \
--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).