1
0
Fork 0

Fixes to lm75 and nct7802 drivers

In lm75 driver, fix TMP75B chip description to ensure correct
 initialization. In nct7802 driver, fix in4 presence detection.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJdS0h+AAoJEMsfJm/On5mBnKwP/ierDLUaZu0sGFh8JqPUXHqB
 DiO9z3f8I4dUdpJ6uviaNDgmIM44yf8EWnRv/68arWFzsTQ3ekAYc2dDQCO1q1rX
 S9pscG0FPiCeRYF7mC9Ko7I5xJNFwZEiAZpLav5RR11JGnsf1Rj8V4ezXPrToWpc
 1dT3dDXXtTnGyzdQKj1FJz5lM+DhA8on1C9EnOABf2U9FonzN+hpBWFo+lV1vfsC
 EV1RkF0RDv5S/HB+KzKvwZHPO4i1kRPTVpilCToyZwn3YeD4bMXWhSqXBk31PxaI
 iAiklmGHti4+K7uNibMcHTq4v+OMkijCLJaJ5ENN5d3DkzIKIWqNoiKtF8n3Q1Tv
 9mQ/27KdJ/b8PeoY7aUu94/YXCIoYe5kpF88wgbsYFTJVodMMBPOqPhj6l5XY1OR
 BXG+J0a+J0ql1MAp4aYqcgggOXRUpJj+Rcf/pI/GedG1OEcTMgjZ/aC5jJBUPYUp
 R5kxTZ6OwPXntLUt/gYuas/PIhcz8aljNUuCWoqjf73LZcOxdPt0coBVy1tWRpC1
 uD9iaS3s24s4vO1wdK4CLXIdIrRTAuAwfOvJH3i2mrOfj36gam0T7kBEVoHT0Tgl
 xh5Olskuq1qeVYfpoY868jAqmBr7IFa0G1el8ZYp9pyp8AAlg56fGAx/wyu3sIP0
 gdRmkC0tuDSTdzpvYbaJ
 =nZsL
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Fixes to lm75 and nct7802 drivers

  In the lm75 driver, fix TMP75B chip description to ensure correct
  initialization. In the nct7802 driver, fix in4 presence detection"

* tag 'hwmon-for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (lm75) Fixup tmp75b clr_mask
  hwmon: (nct7802) Fix wrong detection of in4 presence
alistair/sunxi64-5.4-dsi
Linus Torvalds 2019-08-07 15:06:31 -07:00
commit ecb095bff5
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -704,7 +704,7 @@ static struct attribute *nct7802_in_attrs[] = {
&sensor_dev_attr_in3_alarm.dev_attr.attr,
&sensor_dev_attr_in3_beep.dev_attr.attr,
&sensor_dev_attr_in4_input.dev_attr.attr, /* 17 */
&sensor_dev_attr_in4_input.dev_attr.attr, /* 16 */
&sensor_dev_attr_in4_min.dev_attr.attr,
&sensor_dev_attr_in4_max.dev_attr.attr,
&sensor_dev_attr_in4_alarm.dev_attr.attr,
@ -730,9 +730,9 @@ static umode_t nct7802_in_is_visible(struct kobject *kobj,
if (index >= 6 && index < 11 && (reg & 0x03) != 0x03) /* VSEN1 */
return 0;
if (index >= 11 && index < 17 && (reg & 0x0c) != 0x0c) /* VSEN2 */
if (index >= 11 && index < 16 && (reg & 0x0c) != 0x0c) /* VSEN2 */
return 0;
if (index >= 17 && (reg & 0x30) != 0x30) /* VSEN3 */
if (index >= 16 && (reg & 0x30) != 0x30) /* VSEN3 */
return 0;
return attr->mode;