diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-10-03 16:18:33 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-10-20 19:40:27 +0300 |
commit | 6944aff1ca91e8cf2c373193982cbb0417b4d4cc (patch) | |
tree | 02549285ee6718f207188a977ac197a1cf5ac7c8 /drivers/power/axp152.c | |
parent | 401175220d169ba2bfe7fbb50d73ccc9c1d6a635 (diff) | |
download | u-boot-6944aff1ca91e8cf2c373193982cbb0417b4d4cc.tar.xz |
sunxi: power: Unify axp pmic function names
Stop prefixing the axp functions for setting voltages, etc. with the
model number, there ever is only one pmic driver built into u-boot,
this allows simplifying the callers.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'drivers/power/axp152.c')
-rw-r--r-- | drivers/power/axp152.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c index 740a3b41cd..c60e4d3efb 100644 --- a/drivers/power/axp152.c +++ b/drivers/power/axp152.c @@ -6,7 +6,7 @@ */ #include <common.h> #include <i2c.h> -#include <axp152.h> +#include <axp_pmic.h> static int axp152_write(enum axp152_reg reg, u8 val) { @@ -28,7 +28,7 @@ static u8 axp152_mvolt_to_target(int mvolt, int min, int max, int div) return (mvolt - min) / div; } -int axp152_set_dcdc2(int mvolt) +int axp_set_dcdc2(unsigned int mvolt) { int rc; u8 current, target; @@ -49,28 +49,28 @@ int axp152_set_dcdc2(int mvolt) return rc; } -int axp152_set_dcdc3(int mvolt) +int axp_set_dcdc3(unsigned int mvolt) { u8 target = axp152_mvolt_to_target(mvolt, 700, 3500, 50); return axp152_write(AXP152_DCDC3_VOLTAGE, target); } -int axp152_set_dcdc4(int mvolt) +int axp_set_dcdc4(unsigned int mvolt) { u8 target = axp152_mvolt_to_target(mvolt, 700, 3500, 25); return axp152_write(AXP152_DCDC4_VOLTAGE, target); } -int axp152_set_ldo2(int mvolt) +int axp_set_aldo2(unsigned int mvolt) { u8 target = axp152_mvolt_to_target(mvolt, 700, 3500, 100); return axp152_write(AXP152_LDO2_VOLTAGE, target); } -int axp152_init(void) +int axp_init(void) { u8 ver; int rc; |