]> git.baikalelectronics.ru Git - uboot.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)
commit3815930bfcdeb9e6b98e73eadc44a33b65f1d440
tree83081944dbb77db2d8387a46f5a299b89f0d6308
parentbf7d5ce1e6bbdabc2b78dc076af715e06d9e553f
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