linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Casey Connolly <casey.connolly@linaro.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH 11/11] power: supply: qcom_smbx: program aicl rerun time
Date: Mon, 23 Jun 2025 18:40:07 +0200	[thread overview]
Message-ID: <53a2cdba-0fb8-4b99-b58e-9318b1bd8ef6@oss.qualcomm.com> (raw)
In-Reply-To: <613f2812-3c60-41fe-bdd3-fbe8ea7eeb69@linaro.org>

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 <casey.connolly@linaro.org>
>>> ---
>>>   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

  reply	other threads:[~2025-06-23 16:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 14:55 [PATCH 00/11] power: supply: pmi8998 charger improvements and smb5 support Casey Connolly
2025-06-19 14:55 ` [PATCH 01/11] dt-bindings: power: supply: qcom,pmi89980-charger: add pm8150b and 7250b Casey Connolly
2025-06-27 19:40   ` Rob Herring (Arm)
2025-06-19 14:55 ` [PATCH 02/11] arm64: dts: qcom: sdm845-oneplus-*: set constant-charge-current-max-microamp Casey Connolly
2025-06-19 14:55 ` [PATCH 03/11] power: supply: qcom_pmi8998_charger: fix wakeirq Casey Connolly
2025-06-20 21:44   ` Dmitry Baryshkov
2025-06-19 14:55 ` [PATCH 04/11] power: supply: pmi8998_charger: rename to qcom_smbx Casey Connolly
2025-06-20  8:51   ` Luca Weiss
2025-06-19 14:55 ` [PATCH 05/11] power: supply: qcom_smbx: allow disabling charging Casey Connolly
2025-06-20 16:54   ` Konrad Dybcio
2025-06-22 19:13   ` Sebastian Reichel
2025-06-19 14:55 ` [PATCH 06/11] power: supply: qcom_smbx: respect battery charge-term-current-microamp Casey Connolly
2025-06-20 16:57   ` Konrad Dybcio
2025-06-22 18:28   ` Sebastian Reichel
2025-06-19 14:55 ` [PATCH 07/11] power: supply: qcom_smbx: bump up the max current Casey Connolly
2025-06-20 17:07   ` Konrad Dybcio
2025-06-19 14:55 ` [PATCH 08/11] power: supply: qcom_smbx: remove unused registers Casey Connolly
2025-06-19 14:55 ` [PATCH 09/11] power: supply: qcom_smbx: add smb5 support Casey Connolly
2025-06-20  3:32   ` kernel test robot
2025-06-20  8:39   ` Luca Weiss
2025-06-20  9:01   ` Luca Weiss
2025-06-24  1:06   ` Dmitry Baryshkov
2025-06-29 23:06     ` Caleb Connolly
2025-06-29 23:14       ` Dmitry Baryshkov
2025-06-19 14:55 ` [PATCH 10/11] MAINTAINERS: add myself as smbx charger driver maintainer Casey Connolly
2025-06-20  8:40   ` Luca Weiss
2025-06-19 14:55 ` [PATCH 11/11] power: supply: qcom_smbx: program aicl rerun time Casey Connolly
2025-06-20 17:00   ` Konrad Dybcio
2025-06-23 16:33     ` Casey Connolly
2025-06-23 16:40       ` Konrad Dybcio [this message]
2025-06-22 19:13 ` (subset) [PATCH 00/11] power: supply: pmi8998 charger improvements and smb5 support Sebastian Reichel
2025-08-24  2:55 ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53a2cdba-0fb8-4b99-b58e-9318b1bd8ef6@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=casey.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).