mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
sunxi: power: axp809.c: Fix aldo1-2 being disabled for mvolt != 0
The execution flow is currently like this for aldo_num == 1 or 2:
int axp_set_aldo(int aldo_num, unsigned int mvolt)
{
...
if (mvolt == 0)
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
...
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
}
I.e. aldo1 and aldo2 will always be disabled. This patch fixes it by
setting (rather than clearing) the enable bit when mvolt != 0.
Signed-off-by: Rask Ingemann Lambertsen <rask@formelder.dk>
Fixes: 795857df41
("sunxi: power: add AXP809 support")
This commit is contained in:
parent
0574f786d3
commit
3cc293e26f
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ int axp_set_aldo(int aldo_num, unsigned int mvolt)
|
|||
if (aldo_num == 3)
|
||||
return pmic_bus_setbits(AXP809_OUTPUT_CTRL2,
|
||||
AXP809_OUTPUT_CTRL2_ALDO3_EN);
|
||||
return pmic_bus_clrbits(AXP809_OUTPUT_CTRL1,
|
||||
return pmic_bus_setbits(AXP809_OUTPUT_CTRL1,
|
||||
AXP809_OUTPUT_CTRL1_ALDO1_EN << (aldo_num - 1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue