Re: [PATCH 11/11] power: supply: qcom_smbx: program aicl rerun time

From: Casey Connolly
Date: Mon Jun 23 2025 - 12:42:30 EST




On 6/20/25 19:00, Konrad Dybcio wrote:
On 6/19/25 4:55 PM, Casey Connolly wrote:
We don't know what the bootloader programmed here, but we want to have a
consistent value. Program the automatic input current limit detection to
re-run every 3 seconds. This seems to be necessary at least for smb5.

Signed-off-by: Casey Connolly <casey.connolly@xxxxxxxxxx>
---
drivers/power/supply/qcom_smbx.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/power/supply/qcom_smbx.c b/drivers/power/supply/qcom_smbx.c
index d902f3f43548191d3d0310ce90e699918ed0f16f..b723dba5b86daefb238ee6aae19b1b7e5236fce3 100644
--- a/drivers/power/supply/qcom_smbx.c
+++ b/drivers/power/supply/qcom_smbx.c
@@ -1091,8 +1091,14 @@ static int smb_probe(struct platform_device *pdev)
if (rc < 0)
return dev_err_probe(chip->dev, rc,
"Couldn't write fast charge current cfg");
+ rc = regmap_write_bits(chip->regmap, chip->base + AICL_RERUN_TIME_CFG,
+ AICL_RERUN_TIME_MASK, AIC_RERUN_TIME_3_SECS);

FWIW a random downstream clone I have sets 0x01 which is claimed to
mean "every 12s" instead

hmm I saw that too, I think more documentation would be needed to understand this properly (I'm not exactly clear on what this actually means, when the AICL would re-run, etc).

I have reports that this works ok, so I'd just leave it unless we have info to suggest otherwise.


Konrad
--
Casey (she/they)