提交 fdc7d8e8 编写于 作者: D Dan Robertson 提交者: Guenter Roeck

hwmon: (shtc1) fix shtc1 and shtw1 id mask

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: 1a539d37 ("hwmon: add support for Sensirion SHTC1 sensor")
Signed-off-by: NDan Robertson <dan@dlrobertson.com>
Link: https://lore.kernel.org/r/20190905014554.21658-3-dan@dlrobertson.com
[groeck: Reordered to be first in series and adjusted accordingly]
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 35cd1804
...@@ -28,7 +28,7 @@ static const unsigned char shtc1_cmd_read_id_reg[] = { 0xef, 0xc8 }; ...@@ -28,7 +28,7 @@ static const unsigned char shtc1_cmd_read_id_reg[] = { 0xef, 0xc8 };
/* constants for reading the ID register */ /* constants for reading the ID register */
#define SHTC1_ID 0x07 #define SHTC1_ID 0x07
#define SHTC1_ID_REG_MASK 0x1f #define SHTC1_ID_REG_MASK 0x3f
/* delays for non-blocking i2c commands, both in us */ /* delays for non-blocking i2c commands, both in us */
#define SHTC1_NONBLOCKING_WAIT_TIME_HPM 14400 #define SHTC1_NONBLOCKING_WAIT_TIME_HPM 14400
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册