u-boot-brain/drivers/power/regulator
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
..
act8846.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
as3722_regulator.c power: as3722: fix ldo_get/set_enable for ldo index bigger than 7 2018-05-10 16:34:20 -07:00
bd71837.c regulator: bd718x7: support ROHM BD71837 and BD71847 PMICs 2019-07-19 15:18:47 +02:00
da9063.c power: regulator: add driver for Dialog DA9063 PMIC 2020-01-27 19:54:20 -05:00
fan53555.c power: fan53555: fix fan53555_regulator_set_value 2019-11-23 22:29:49 +08:00
fixed.c regulator: Factor out common enable code 2019-07-18 11:31:24 -04:00
gpio-regulator.c regulator: Allow enabling GPIO regulator 2019-07-18 11:31:25 -04:00
Kconfig power: regulator: add driver for Dialog DA9063 PMIC 2020-01-27 19:54:20 -05:00
lp873x_regulator.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lp87565_regulator.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile power: regulator: add driver for Dialog DA9063 PMIC 2020-01-27 19:54:20 -05:00
max77686.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
palmas_regulator.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pbias_regulator.c ARM: dts: dra7: Change pbias voltage to 3.3V 2019-04-12 08:05:56 -04:00
pfuze100.c power: pfuze100: Fix off by one error in voltage table handling 2019-06-11 10:42:48 +02:00
pwm_regulator.c power: pwm regulator: support live tree 2018-05-08 13:12:33 +09:00
regulator_common.c regulator: fix: Move code to enable gpio regulator to pre_probe from ofdata_to_platdata 2020-02-10 18:00:38 -05:00
regulator_common.h regulator: Factor out common enable code 2019-07-18 11:31:24 -04:00
regulator-uclass.c regulator: fix: Move code to enable gpio regulator to pre_probe from ofdata_to_platdata 2020-02-10 18:00:38 -05:00
rk8xx.c power: pmic: rk809: support rk809 pmic 2019-11-10 20:34:10 +08:00
s2mps11_regulator.c power: regulator: s2mps11: Add enable delay 2019-03-11 15:53:19 +09:00
s5m8767.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stm32-vrefbuf.c power: regulator: stm32: Fix warnings when compiling with W=1 2019-07-12 11:50:56 +02:00
stpmic1.c power: stpmic1: Fix warnings when compiling with W=1 2019-07-12 11:50:57 +02:00
tps62360_regulator.c power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe 2020-01-20 10:10:28 +05:30
tps65090_regulator.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps65910_regulator.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tps65941_regulator.c power: regulator: tps65941: add regulator support 2019-11-07 18:39:17 -05:00