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)
commit767e684367e4759d9855b184045b7a9d6b19acd2
treef53d185dab2832603017ab73ee473edc71bfd5cf
parentf9be5cb6c1f0191f8bcf4413b7e17e58e8dfaaa1
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: 2b0e7ac0841b ("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