]> git.dujemihanovic.xyz Git - u-boot.git/commit
sunxi: pmic_bus: Use the DM PMIC interface when possible
authorSamuel Holland <samuel@sholland.org>
Fri, 8 Oct 2021 05:17:23 +0000 (00:17 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 12 Oct 2021 09:48:37 +0000 (10:48 +0100)
commit8b0eacdf2b0d472d991c3af4a236ad02759fc59e
tree39dcfcfc198e03ebffa2fb62e586c149ec2c8621
parentd3b02987cb6126650ff5077ccaba1e4e1ba76d6c
sunxi: pmic_bus: Use the DM PMIC interface when possible

The pmic_bus functions are used in both SPL (for regulator setup) and
U-Boot proper (for regulator setup, SID access, GPIO, and poweroff).

Currently, pmic_bus conflicts with DM_I2C because it uses the legacy I2C
interface. This commit makes pmic_bus dual-compatible with either the
legacy I2C functions or the newly-added PMIC_AXP driver (which uses
DM_I2C). In turn, this allows platforms to start transitioning to DM_I2C
in U-Boot proper, without breaking boards that still depend on the
legacy I2C interface for other reasons.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/mach-sunxi/Kconfig
arch/arm/mach-sunxi/pmic_bus.c