Skip to content
Commit b52d51d8 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Sebastian Reichel
Browse files

power: supply: core: Avoid duplicate hwmon device from thermal framework



When the power supply device being registered supports a temperature
readout, the core registers a thermal zone for it. The thermal core
would register a hwmon device for that unless told otherwise.

When CONFIG_POWER_SUPPLY_HWMON is enabled, the power supply core creates
a hwmon device. This results in a second entry, one which has a better
name than the one registered through the thermal framework. It could
potentially have readouts other than temperature.

To simplify the result, tell the thermal framework to not register a
hwmon device if CONFIG_POWER_SUPPLY_HWMON is enabled. The result is
one hwmon device with all the readings the device supports.

Signed-off-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 1a805883
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