Commit 6f5738db authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'hwmon-for-v5.17-rc6' of...

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

Pull hwmon fixes from Guenter Roeck:
 "Fix two old bugs and one new bug in the hwmon subsystem:

   - In pmbus core, clear pmbus fault/warning status bits after read to
     follow PMBus standard

   - In hwmon core, handle failure to register sensor with thermal zone
     correctly

   - In ntc_thermal driver, use valid thermistor names for Samsung
     thermistors"

* tag 'hwmon-for-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (pmbus) Clear pmbus fault/warning bits after read
  hwmon: Handle failure to register sensor with thermal zone correctly
  hwmon: (ntc_thermistor) Underscore Samsung thermistor
parents 4eb0a7c8 35f165f0
...@@ -214,12 +214,14 @@ static int hwmon_thermal_add_sensor(struct device *dev, int index) ...@@ -214,12 +214,14 @@ static int hwmon_thermal_add_sensor(struct device *dev, int index)
tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata, tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata,
&hwmon_thermal_ops); &hwmon_thermal_ops);
/* if (IS_ERR(tzd)) {
* If CONFIG_THERMAL_OF is disabled, this returns -ENODEV, if (PTR_ERR(tzd) != -ENODEV)
* so ignore that error but forward any other error. return PTR_ERR(tzd);
*/ dev_info(dev, "temp%d_input not attached to any thermal zone\n",
if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV)) index + 1);
return PTR_ERR(tzd); devm_kfree(dev, tdata);
return 0;
}
err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node); err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node);
if (err) if (err)
......
...@@ -59,7 +59,7 @@ static const struct platform_device_id ntc_thermistor_id[] = { ...@@ -59,7 +59,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
[NTC_NCP15XH103] = { "ncp15xh103", TYPE_NCPXXXH103 }, [NTC_NCP15XH103] = { "ncp15xh103", TYPE_NCPXXXH103 },
[NTC_NCP18WB473] = { "ncp18wb473", TYPE_NCPXXWB473 }, [NTC_NCP18WB473] = { "ncp18wb473", TYPE_NCPXXWB473 },
[NTC_NCP21WB473] = { "ncp21wb473", TYPE_NCPXXWB473 }, [NTC_NCP21WB473] = { "ncp21wb473", TYPE_NCPXXWB473 },
[NTC_SSG1404001221] = { "ssg1404-001221", TYPE_NCPXXWB473 }, [NTC_SSG1404001221] = { "ssg1404_001221", TYPE_NCPXXWB473 },
[NTC_LAST] = { }, [NTC_LAST] = { },
}; };
......
...@@ -911,6 +911,11 @@ static int pmbus_get_boolean(struct i2c_client *client, struct pmbus_boolean *b, ...@@ -911,6 +911,11 @@ static int pmbus_get_boolean(struct i2c_client *client, struct pmbus_boolean *b,
pmbus_update_sensor_data(client, s2); pmbus_update_sensor_data(client, s2);
regval = status & mask; regval = status & mask;
if (regval) {
ret = pmbus_write_byte_data(client, page, reg, regval);
if (ret)
goto unlock;
}
if (s1 && s2) { if (s1 && s2) {
s64 v1, v2; s64 v1, v2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment