Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecb095bf authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hwmon-for-v5.3-rc4' of...

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
parents 33920f1e a95a4f3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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;