From: sashiko-bot@kernel.org
To: "Vincent Cloutier" <vincent.cloutier@icloud.com>
Cc: devicetree@vger.kernel.org, Frank.Li@kernel.org, robh@kernel.org,
imx@lists.linux.dev, conor+dt@kernel.org
Subject: Re: [PATCH v1 3/4] power: supply: bq25890: Add input voltage limit
Date: Sun, 27 Sep 2026 15:06:44 +0000 [thread overview]
Message-ID: <20260927150644.D65E21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260927145538.233548-4-vincent.cloutier@icloud.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] power/supply: transient VINDPM limit due to write sequence
--
commit 3c4a08cfdbd118c7f60e9223379cfa47c0168057
Author: Vincent Cloutier <vincent@cloutier.co>
power: supply: bq25890: Add input voltage limit
The BQ25890 family supports an absolute input voltage dynamic power
management threshold. Read input-voltage-limit-microvolt from firmware,
enable absolute VINDPM, and then program the requested threshold.
> diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
> index 741a45cc5f35d..71d6cf1796674 100644
> --- a/drivers/power/supply/bq25890_charger.c
> +++ b/drivers/power/supply/bq25890_charger.c
[ ... ]
> @@ -814,18 +818,67 @@ static int bq25890_get_chip_state(struct bq25890_device *bq,
> return 0;
> }
>
> +static int bq25890_set_vindpm(struct bq25890_device *bq)
> +{
> + int ret;
> +
> + if (!bq->init_data.force_vindpm)
> + return 0;
> +
> + ret = bq25890_field_write(bq, F_FORCE_VINDPM, 1);
> + if (ret < 0)
> + return ret;
> +
> + return bq25890_field_write(bq, F_VINDPM, bq->init_data.vindpm);
> +}
[Severity: Medium]
Does writing F_FORCE_VINDPM before F_VINDPM create a transient VINDPM limit?
Because these fields are written via separate read-modify-write I2C
transactions, enabling F_FORCE_VINDPM before setting the actual F_VINDPM
threshold creates a brief window where the charger explicitly enforces
whatever stale limit was previously in the register.
If this stale limit is too high for the current input source, could it
cause momentary input current throttling during device initialization,
resume, or cable insertion?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260927145538.233548-1-vincent.cloutier@icloud.com?part=3
next prev parent reply other threads:[~2026-09-27 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 14:55 [PATCH v1 0/4] power: supply: bq25890: add input voltage limit Vincent Cloutier
2026-09-27 14:55 ` [PATCH v1 1/4] arm64: dts: imx8mq-librem5: Remove invalid monitored-battery Vincent Cloutier
2026-09-27 14:55 ` [PATCH v1 2/4] dt-bindings: power: supply: bq25890: Add input voltage limit Vincent Cloutier
2026-09-28 16:42 ` Conor Dooley
2026-09-27 14:55 ` [PATCH v1 3/4] " Vincent Cloutier
2026-09-27 15:06 ` sashiko-bot [this message]
2026-09-27 14:55 ` [PATCH v1 4/4] arm64: dts: imx8mq-librem5: Set BQ25895 " Vincent Cloutier
2026-10-03 1:08 ` Sebastian Krzyszkowiak
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=20260927150644.D65E21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vincent.cloutier@icloud.com \
/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