From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org,
conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v6 4/5] mfd: max8907: Convert to use device managed poweroff handler
Date: Mon, 23 Nov 2026 15:10:58 +0000 [thread overview]
Message-ID: <sashiko-outbox-229503@kernel.org> (raw)
In-Reply-To: <20261123150224.199601-5-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] mfd: max8907: max8907_i2c_probe() drops
maxim,system-power-controller check
--
commit b8bc64d186feb8ec318721e193d4a0bf70c6eebf
Author: Svyatoslav Ryhel <clamor95@gmail.com>
mfd: max8907: Convert to use device managed poweroff handler
This commit replaces devm_register_sys_off_handler() with
devm_register_power_off_handler() and switches the DT check from
maxim,system-power-controller to of_device_is_system_power_controller().
> diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c
> index f1cabb666d8ed..5d17971a8e9ab 100644
> --- a/drivers/mfd/max8907.c
> +++ b/drivers/mfd/max8907.c
> @@ -189,8 +189,6 @@ static int max8907_i2c_probe(struct i2c_client *i2c)
> struct device *dev = &i2c->dev;
> struct max8907 *max8907;
> int ret;
> - bool pm_off = of_property_read_bool(dev->of_node,
> - "maxim,system-power-controller");
>
> max8907 = devm_kzalloc_obj(dev, struct max8907);
> if (!max8907)
> @@ -241,12 +239,10 @@ static int max8907_i2c_probe(struct i2c_client *i2c)
> if (ret)
> return dev_err_probe(dev, ret, "Failed to add MFD devices\n");
>
> - if (pm_off) {
> - ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_POWER_OFF,
> - SYS_OFF_PRIO_DEFAULT,
> - max8907_power_off, max8907);
> + if (of_device_is_system_power_controller(dev->of_node)) {
> + ret = devm_register_power_off_handler(dev, max8907_power_off, max8907);
> if (ret)
> - return dev_err_probe(dev, ret, "failed to register sys-off handler\n");
> + return dev_err_probe(dev, ret, "failed to register power-off handler\n");
> }
>
> return 0;
[Severity: Medium]
Should max8907_i2c_probe() continue checking the legacy
maxim,system-power-controller property as a fallback alongside
of_device_is_system_power_controller()?
of_device_is_system_power_controller() only checks the standard
system-power-controller property. In commit "regulator: dt-bindings:
maxim,max8907: Convert to DT schema" earlier in this series,
Documentation/devicetree/bindings/regulator/maxim,max8907.yaml keeps
maxim,system-power-controller as a deprecated property rather than
removing it, and commit "mfd: max8907: Remove platform_data based probing"
notes that external DTBs may exist. On a board booting with an existing
DTB that uses maxim,system-power-controller, max8907_i2c_probe() will now
skip registering the power-off handler, leaving the system unable to power
off via the PMIC.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123150224.199601-1-clamor95@gmail.com?part=4
next prev parent reply other threads:[~2026-11-23 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 15:02 [PATCH v6 0/5] mfd: max8907: Schema, pdata and poweroff Svyatoslav Ryhel
2026-11-23 15:02 ` [PATCH v6 1/5] regulator: dt-bindings: maxim,max8907: Convert to DT schema Svyatoslav Ryhel
2026-11-23 15:02 ` [PATCH v6 2/5] mfd: max8907: Remove platform_data based probing Svyatoslav Ryhel
2026-11-23 15:02 ` [PATCH v6 3/5] mfd: max8907: Switch to resource-managed versions of helpers Svyatoslav Ryhel
2026-11-23 15:02 ` [PATCH v6 4/5] mfd: max8907: Convert to use device managed poweroff handler Svyatoslav Ryhel
2026-11-23 15:10 ` sashiko-bot [this message]
2026-11-23 15:02 ` [PATCH v6 5/5] mfd: max8907: Add restart handler Svyatoslav Ryhel
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-229503@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--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