]> git.dujemihanovic.xyz Git - u-boot.git/commit
sunxi: pmic_bus: Clean up preprocessor conditions
authorSamuel Holland <samuel@sholland.org>
Fri, 8 Oct 2021 05:17:22 +0000 (00:17 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 12 Oct 2021 09:30:19 +0000 (10:30 +0100)
commitd3b02987cb6126650ff5077ccaba1e4e1ba76d6c
tree83081944dbb77db2d8387a46f5a299b89f0d6308
parent3227c85fe76312290c3ec15a02dcba3f9c6bc399
sunxi: pmic_bus: Clean up preprocessor conditions

Instead of using the SoC symbols to decide the bus type, use whichever
bus driver is actually enabled. This allows collapsing all of the AXP2xx
and AXP8xx variants into one "else" case. It also has the advantage of
falling back to I2C when the other bus drivers are disabled; this works
because all of the PMICs support I2C in addition to other interfaces.

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/pmic_bus.c