]> git.dujemihanovic.xyz Git - u-boot.git/commit
include: axp_pmic: Include headers for all variants
authorSamuel Holland <samuel@sholland.org>
Sun, 22 Aug 2021 23:18:04 +0000 (18:18 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 25 Oct 2021 13:50:42 +0000 (14:50 +0100)
commit344df3ca2c3c2e98c9ab4112e8ebd660ad2be6ea
treed13b81f7abe9b1733675b3ec16d80b6f813f65a7
parent5b4afbd40c9bc1cac6705e27e9ec0683622ca86a
include: axp_pmic: Include headers for all variants

A single DM-based driver should be able to support some feature for
several PMIC variants where the interface is the same. For example,
all PMIC variants use the same register bit to trigger poweroff.

However, currently only definitions for a single PMIC are available at
a time. This requires drivers to use #ifdefs and different indentifiers
for each variant they support.

Let's simplify this by making register definitions for all variants
available from the header. Then no preprocessor conditions are needed;
the driver can use the register definition from any variant that
supports the relevant feature.

An exception is the GPIO-related definitions, which do not use unique
identifiers. So for now, keep them like before. They will be cleaned up
along with the GPIO driver.

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>
include/axp152.h
include/axp209.h
include/axp221.h
include/axp809.h
include/axp818.h
include/axp_pmic.h