mfd: axp20x: Switch to the sys-off handler API
authorSamuel Holland <samuel@sholland.org>
Wed, 28 Dec 2022 16:27:52 +0000 (10:27 -0600)
committerLee Jones <lee@kernel.org>
Wed, 22 Feb 2023 08:25:52 +0000 (08:25 +0000)
commit1b1305e95e85624f538ec56db9acf88e2d3d7397
tree83b0b7dad14a8900e75ff0d6091ef83c68d9b044
parent88a32c2c5e98d72765846db83c1739e7b036770a
mfd: axp20x: Switch to the sys-off handler API

This removes a layer of indirection through pm_power_off() and allows
the PMIC handler to be used as a fallback when firmware power off fails.
This happens on boards like the Clockwork DevTerm R-01 where OpenSBI
does not know how to use the PMIC to power off the board.

Move the check for AXP288 to avoid registering a dummy handler.

Signed-off-by: Samuel Holland <samuel@sholland.org>
[Lee: Removed superfluous new line]
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221228162752.14204-1-samuel@sholland.org
drivers/mfd/axp20x.c