[U-Boot] [PATCH] sunxi: axp2xx: disable ldoio0/1 at boot
Hans de Goede
hdegoede at redhat.com
Mon Sep 12 15:24:19 CEST 2016
Hi,
On 12-09-16 14:41, Ian Campbell wrote:
> On Mon, 2016-09-12 at 09:55 +0200, Hans de Goede wrote:
>> @@ -223,7 +223,14 @@ int axp_init(void)
>>> if (!(axp_chip_id == 0x6 || axp_chip_id == 0x7 || axp_chip_id == 0x17))
>>> return -ENODEV;
>>
>>> - return 0;
>>> + /*
>>> + * Turn off LDOIO regulators / tri-state GPIO pins, when rebooting
>>> + * from android these are sometimes on.
>>> + */
>>> + ret |= pmic_bus_write(AXP_GPIO0_CTRL, AXP_GPIO_CTRL_INPUT);
>>> + ret |= pmic_bus_write(AXP_GPIO1_CTRL, AXP_GPIO_CTRL_INPUT);
>
> If ret values are errno's (as the context suggests by containing
> -ENODEV) then or-ing them together could result in corruption from
> combining two distinct errno values.
True, v2 coming up ...
Regards,
Hans
More information about the U-Boot
mailing list