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

Skip to content
Commit e782bc16 authored by Fabio Estevam's avatar Fabio Estevam Committed by Zhang Rui
Browse files

thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()



Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

, so do the conversion as suggested.

Also, this results in the core taking care of creating the 'name'
attribute, so drop the code doing that from the thermal driver.

The initial attempt to convert this driver to
hwmon_device_register_with_info() caused issues on the N900 platform
in commit 7611fb68 ("thermal: thermal_hwmon: Convert to
hwmon_device_register_with_info()"):

bq27xxx-battery 2-0055: failed to register battery
bq27xxx-battery: probe of 2-0055 failed with error -22
...
rx51-battery: probe of n900-battery failed with error -22

, leading to a revert in commit 3feb479c ("Revert "thermal:
thermal_hwmon: Convert to hwmon_device_register_with_info()"").

The probe errors happened due to the '-' character being present in
the name of the power supply devices: bq27200-0 and rx51-battery.

Since commit 74d3b641 ("hwmon: Relax name attribute validation
for new APIs") hwmon will no longer treat these names as errors,
allowing the transition for hwmon_device_register_with_info() to
happen in a safely manner.

Cc: Pavel Machek <pavel@ucw.cz>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent a5de11d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment