mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
hwmon fixes for v5.17-rc6
Fix two old bugs and one new bug in 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 -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmIVr/UACgkQyx8mb86f mYHEig//UZe83C/FMxYH/tHp/71+IEafZraTe0IOLPZSKW3OXgtOMymiJtgOokzl eD60/GwRSu9wlmYeemQowlXwGd6dLsiCy1SgZVzE532Zm0VEx/hFTPrxifsZl2TK PDlYCbWJ11xaGpnhXN7oCAuYxtY2z3VK6OJFh9nsLpWSVhFECsQJSpt6TjwXD+uD tIdhLEuqENmBonLP4nxBRBctNjwiPBHppGAvjUty7HkChTFA6b3cd9ydR7V/xgwb +mfzWVG9d0DbgVJtS33/r6/K927mzZNz9Her7MKBfAaDoRifRUspT+UEuM/2GTb8 ukigFVCQg6pzf53FrzY3fgH98ENl6rQ/Fmkt2nAAbIpq+FDy1T9LqiSaUF2qfQbR CmeYiADlCsPWTFR5MO+TWxGuBx4YfxkMJQ4+eAHO6ms1/OnSHVdpzgYQ+fZG7L4D NSlYFuDq8Q4Jv52J/vffaYiZf3U4QTsE3KnopDuwITYKNKIht1pj57wlk2dIKwMg gkH8jX9crCI2/TXZPxTRgFNlIBGr1D9SiYyTgVzmfqqWl1S/zQMzg9JYjmB29aZC Q2YO9Kji+XTMCbNwPat+yOxe01Tnt3msgVt9honA5HT/a6tGMQ0zt45sIcl0RAC5 rEbe6HnLmob8IH731B4+6lQNBg4WoAw7pUN2vfLQhfYTnWxQLXk= =hqZA -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
6f5738db96
@ -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,
|
||||
&hwmon_thermal_ops);
|
||||
/*
|
||||
* If CONFIG_THERMAL_OF is disabled, this returns -ENODEV,
|
||||
* so ignore that error but forward any other error.
|
||||
*/
|
||||
if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV))
|
||||
return PTR_ERR(tzd);
|
||||
if (IS_ERR(tzd)) {
|
||||
if (PTR_ERR(tzd) != -ENODEV)
|
||||
return PTR_ERR(tzd);
|
||||
dev_info(dev, "temp%d_input not attached to any thermal zone\n",
|
||||
index + 1);
|
||||
devm_kfree(dev, tdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node);
|
||||
if (err)
|
||||
|
@ -59,7 +59,7 @@ static const struct platform_device_id ntc_thermistor_id[] = {
|
||||
[NTC_NCP15XH103] = { "ncp15xh103", TYPE_NCPXXXH103 },
|
||||
[NTC_NCP18WB473] = { "ncp18wb473", TYPE_NCPXXWB473 },
|
||||
[NTC_NCP21WB473] = { "ncp21wb473", TYPE_NCPXXWB473 },
|
||||
[NTC_SSG1404001221] = { "ssg1404-001221", TYPE_NCPXXWB473 },
|
||||
[NTC_SSG1404001221] = { "ssg1404_001221", TYPE_NCPXXWB473 },
|
||||
[NTC_LAST] = { },
|
||||
};
|
||||
|
||||
|
@ -911,6 +911,11 @@ static int pmbus_get_boolean(struct i2c_client *client, struct pmbus_boolean *b,
|
||||
pmbus_update_sensor_data(client, s2);
|
||||
|
||||
regval = status & mask;
|
||||
if (regval) {
|
||||
ret = pmbus_write_byte_data(client, page, reg, regval);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
}
|
||||
if (s1 && s2) {
|
||||
s64 v1, v2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user