Re: [PATCH 2/2] power: regulator: rk8xx: Add 500us delay after LDO regulator is enabled

hi,
Reviewed-by: elaine.zhangelaine.zhang@rock-chips.com
在 2023/7/26 16:40, Jonas Karlman 写道:
Hi Kever, On 2023-07-26 10:36, Kever Yang wrote:
Hi Jonas,
On 2023/7/2 20:41, Jonas Karlman wrote:
A quick power cycle of a LDO regulator during dw-mmc signal voltage change has shown that SD-card does not always get recognized.
Linux driver use an enable_time of 400us for LDO regulators. Apply a 500us delay when a LDO regulator is enabled to fix possible issues.
Does 400us not enough for the board you test?
It probably is, linux apply a 400-500us range sleep so I went with upper limit of 500us for this patch.
This looks okay.
Regards, Jonas
Hi Elaine,
Could help to check this change?
Thanks,
- Kever
Fixes: 94afc1cb466a ("power: regulator: rk8xx: update the driver for rk808 and rk818") Signed-off-by: Jonas Karlmanjonas@kwiboo.se
drivers/power/regulator/rk8xx.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c index 0ee07ad299d7..e95640a39b0a 100644 --- a/drivers/power/regulator/rk8xx.c +++ b/drivers/power/regulator/rk8xx.c @@ -12,6 +12,7 @@ #include <dm.h> #include <errno.h> #include <log.h> +#include <linux/delay.h> #include <power/rk8xx_pmic.h> #include <power/pmic.h> #include <power/regulator.h> @@ -616,6 +617,9 @@ static int _ldo_set_enable(struct udevice *pmic, int ldo, bool enable) break; }
- if (enable)
udelay(500);
- return ret; }
participants (1)
-
zhangqing