]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: ab8500: Defer thermal zone probe
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 30 Oct 2022 20:55:54 +0000 (21:55 +0100)
committerSebastian Reichel <sre@kernel.org>
Tue, 1 Nov 2022 00:00:32 +0000 (01:00 +0100)
commit85bfab0550fc0bf388309bdacb445f8d6d261206
treef53d185dab2832603017ab73ee473edc71bfd5cf
parent0c59ab313433931dd2c76402a600e99da70a9521
power: supply: ab8500: Defer thermal zone probe

The call thermal_zone_get_zone_by_name() used to return the
thermal zone right away, but recent refactorings in the
thermal core has changed this so the thermal zone used by
the battery is probed later, and the call returns -ENODEV.

This was always quite fragile. If we get -ENODEV, then
return a -EPROBE_DEFER and try again later.

Cc: phone-devel@vger.kernel.org
Fixes: 44e3bb0933bc ("power: supply: ab8500: Integrate thermal zone")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_btemp.c