u-boot/drivers/power
Lukasz Majewski b7adcdd073 regulator: fix: Move code to enable gpio regulator to pre_probe from ofdata_to_platdata
The commit e8e9715df2 ("regulator: fixed: Modify enable-active-high behavior")
fixed the regulator driver behavior when 'enable-active-high' is defined.
Unfortunately, this patch used dm_regulator_platdata()'s "boot_on" member
to set GPIOD_IS_OUT_ACTIVE flag and enable the regulator.

The issue here is that regulator_common_ofdata_to_platdata() is called
_before_ regulator_pre_probe() function in which the 'regulator-boot-on'
property is asserted.

As a result the GPIOD_IS_OUT_ACTIVE flag is not set and gpio_request_by_name()
called in the former function is not enabling the regulator.
This is problematic for e.g. i.MX ethernet driver, which then tries to
perform initialization without power (and fails).

The solution here is to explicitly enable regulator in regulator_pre_probe()
callback only when 'regulator-boot-on' property is present in device tree.
The GPIOD_IS_OUT_ACTIVE flag is not set at all, but relevant gpio is
requested.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Tested-by: Patrice Chotard <patrice.chotard@st.com>
2020-02-10 18:00:38 -05:00
..
acpi_pmc x86: apl: Add PMC driver 2019-12-15 11:44:26 +08:00
battery SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
domain power: domain: add power domain support for MT7622 2020-01-16 09:39:45 -05:00
fuel_gauge SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mfd SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pmic power: pmic: add driver for Dialog DA9063 PMIC 2020-01-27 19:54:20 -05:00
regulator regulator: fix: Move code to enable gpio regulator to pre_probe from ofdata_to_platdata 2020-02-10 18:00:38 -05:00
axp152.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
axp209.c power: axp209: Limit inrush current for broken boards 2018-12-07 22:24:33 +05:30
axp221.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
axp809.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
axp818.c power: axp818: Fix typo in axp_set_dldo 2019-03-08 11:36:59 +05:30
exynos-tmu.c power: change from meaningless value to error number 2017-01-11 19:40:14 +09:00
ftpmu010.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig poweroff: add poweroff for mt6323 pmic 2020-01-10 10:25:13 -05:00
Makefile poweroff: add poweroff for mt6323 pmic 2020-01-10 10:25:13 -05:00
mt6323.c poweroff: add poweroff for mt6323 pmic 2020-01-10 10:25:13 -05:00
palmas.c power: make most tps drivers and the twl4030 driver compatible with DM_I2C 2018-12-10 06:17:30 +01:00
power_core.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
power_dialog.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
power_fsl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
power_i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
power_spi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sy8106a.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps6586x.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
twl4030.c power: make most tps drivers and the twl4030 driver compatible with DM_I2C 2018-12-10 06:17:30 +01:00
twl6030.c power: make most tps drivers and the twl4030 driver compatible with DM_I2C 2018-12-10 06:17:30 +01:00