[U-Boot] [PATCH] sunxi: axp2xx: disable ldoio0/1 at boot
Ian Campbell
ijc+uboot at hellion.org.uk
Mon Sep 12 14:41:43 CEST 2016
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.
Ian.
More information about the U-Boot
mailing list