summaryrefslogtreecommitdiffstats
path: root/drivers/power/axp152.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-10-03 15:18:33 +0200
committerHans de Goede <hdegoede@redhat.com>2015-10-20 18:40:27 +0200
commit6944aff1ca91e8cf2c373193982cbb0417b4d4cc (patch)
tree02549285ee6718f207188a977ac197a1cf5ac7c8 /drivers/power/axp152.c
parent401175220d169ba2bfe7fbb50d73ccc9c1d6a635 (diff)
downloadblackbird-obmc-uboot-6944aff1ca91e8cf2c373193982cbb0417b4d4cc.tar.gz
blackbird-obmc-uboot-6944aff1ca91e8cf2c373193982cbb0417b4d4cc.zip
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.c12
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;
OpenPOWER on IntegriCloud