On 6/23/25 6:33 PM, Casey Connolly wrote: > > > 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 <[email protected]> >>> --- >>> 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.
Well, in case of such lack of understanding I'd much prefer to see a magic number that shipped on hundreds of millions of devices than a magic number that was confirmed working on a couple dozen.. especially since this looks like an improvement that people who had their hand in the hw design wouldn't generally overlook unless there was reasons (e.g. compatibility or some sort of a quirk) Konrad
