From 673504b8088cfe8ea19d260dde94de99047bcdb1 Mon Sep 17 00:00:00 2001 From: qiaopf1 Date: Fri, 11 Feb 2022 10:58:29 +0800 Subject: [PATCH] rhode: solve the problem of slow power-off of front dvdd Details: according to datasheet,write 0x8f to 0x02 RDIS register ,each ldo regulator output discharge register enable control. Change-Id: I05e5c21fb428138993a9a29a105aa4e71819ff3b Signed-off-by: qiaopf1 Reviewed-on: https://gerrit.mot.com/2188607 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Zhichao Chen Reviewed-by: Zhenxin Xi Submit-Approved: Jira Key --- drivers/regulator/wl2866d/wl2866d-regulator.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/wl2866d/wl2866d-regulator.c b/drivers/regulator/wl2866d/wl2866d-regulator.c index 4fe76552e2fc..baaa3ad66f69 100644 --- a/drivers/regulator/wl2866d/wl2866d-regulator.c +++ b/drivers/regulator/wl2866d/wl2866d-regulator.c @@ -218,7 +218,13 @@ static int wl2866d_regulator_init(struct wl2866d *chip) "Disable all LDO output failed!!!\n"); return ret; } - + /* Enable all ldo discharge by default */ + ret = regmap_write(chip->regmap, WL2866D_DISCHARGE_RESISTORS, 0x8f); + if (ret < 0) { + dev_err(chip->dev, + "Enable LDO discharge failed!!!\n"); + return ret; + } for (id = 0; id < WL2866D_MAX_REGULATORS; id++) { chip->rdesc[id] = &wl2866d_regls_desc[id]; rdesc = chip->rdesc[id];