From: sashiko-bot@kernel.org
To: "Martin Kepplinger-Novakovic"
<martin.kepplinger-novakovic@ginzinger.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] regulator: pca9450: Make i2c-reset a warm reset optionally
Date: Thu, 03 Dec 2026 15:04:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-248053@kernel.org> (raw)
In-Reply-To: <20261203145051.489939-2-martin.kepplinger-novakovic@ginzinger.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] regulator: pca9450: hardcoding SW reset mode in DT ignores
reboot_mode
- [Low] regulator: pca9450: commit message mislabels I2C SW_RST as a pin
--
commit ddf73cff1946d2e4ed9535b9671c2901505af39d
Author: Martin Kepplinger-Novakovic <martink@posteo.de>
regulator: pca9450: Make i2c-reset a warm reset optionally
This commit adds the nxp,i2c-warm-reset DT property to make
pca9450_i2c_restart_handler() issue a warm reset command (0x35) to
PCA9450_REG_SWRST instead of the default cold reset command (0x14).
> When resetting via i2c-reset pin, the pca9450 does a cold reset by default
> ("Power recycle all regulators except LDO1, LDO2 and CLK_32K_OUT"). Add
> support for doing Warm Reset ("Toggle POR_B for 20 ms") instead if needed.
[Severity: Low]
Is "i2c-reset pin" accurate here? PCA9450_REG_SWRST is an I2C software
reset command issued by pca9450_i2c_restart_handler(), not a hardware
reset pin like WDOG_B.
The commit message also does not explain what board-level constraint
requires fixing warm reset in DT rather than selecting it at runtime.
> diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
> index f1c787e6db8bf..8423abc55612f 100644
> --- a/drivers/regulator/pca9450-regulator.c
> +++ b/drivers/regulator/pca9450-regulator.c
[ ... ]
> @@ -1195,7 +1196,7 @@ static int pca9450_i2c_restart_handler(struct sys_off_data *data)
> struct i2c_client *i2c = container_of(pca9450->dev, struct i2c_client, dev);
>
> dev_dbg(&i2c->dev, "Restarting device..\n");
> - if (i2c_smbus_write_byte_data(i2c, PCA9450_REG_SWRST, SW_RST_COMMAND) == 0) {
> + if (i2c_smbus_write_byte_data(i2c, PCA9450_REG_SWRST, pca9450->sw_reset_cmd) == 0) {
> /* tRESTART is 250ms, so 300 should be enough to make sure it happened */
> mdelay(300);
> /* When we get here, the PMIC didn't power cycle for some reason. so warn.*/
> @@ -1223,6 +1224,11 @@ static int pca9450_of_init(struct pca9450 *pca9450)
> else
> reset_ctrl = WDOG_B_CFG_COLD_LDO12;
>
> + if (of_property_read_bool(i2c->dev.of_node, "nxp,i2c-warm-reset"))
> + pca9450->sw_reset_cmd = SW_RST_WARM_COMMAND;
> + else
> + pca9450->sw_reset_cmd = SW_RST_COMMAND;
> +
> /* Set reset behavior on assertion of WDOG_B signal */
> ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_RESET_CTRL,
> WDOG_B_CFG_MASK, reset_ctrl);
[Severity: Medium]
Should pca9450_i2c_restart_handler() select warm vs cold reset from
data->mode instead of hardcoding it via the nxp,i2c-warm-reset DT
property?
Unlike nxp,wdog_b-warm-reset, which configures the hardware WDOG_B input,
PCA9450_REG_SWRST is a software command sent during restart. Fixing it in
DT ignores reboot=warm/reboot=cold and /sys/kernel/reboot/mode, preventing
boards with the property from forcing a cold reset.
Checking data->mode == REBOOT_WARM in pca9450_i2c_restart_handler()
(matching tps65219_restart() in drivers/mfd/tps65219.c) would support both
modes at runtime without adding a vendor DT property.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203145051.489939-1-martin.kepplinger-novakovic@ginzinger.com?part=2
next prev parent reply other threads:[~2026-12-03 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 14:50 [PATCH 1/2] dt-bindings: regulator: pca9450: add warm reset for i2c-reset pin Martin Kepplinger-Novakovic
2026-12-03 14:50 ` [PATCH 2/2] regulator: pca9450: Make i2c-reset a warm reset optionally Martin Kepplinger-Novakovic
2026-12-03 15:04 ` sashiko-bot [this message]
2026-12-03 15:07 ` [PATCH 1/2] dt-bindings: regulator: pca9450: add warm reset for i2c-reset pin Mark Brown
2026-12-03 15:10 ` sashiko-bot
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=sashiko-outbox-248053@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=martin.kepplinger-novakovic@ginzinger.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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