From: sashiko-bot@kernel.org
To: "Victor Krawiec" <victor.krawiec@arturia.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 1/4] regulator: dt-bindings: Add Silergy SYR82X allowed modes
Date: Wed, 15 Jul 2026 16:02:28 +0000 [thread overview]
Message-ID: <20260715160228.F2FB01F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715155141.128601-2-victor.krawiec@arturia.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [Medium] Missing of_map_mode callback in fan53555 driver renders DT mode constants non-functional.
- [Low] Brand name misspelled in the newly added header file comment.
Pre-existing issues:
- [High] fan53555_set_mode() corrupts the voltage or enable register instead of changing the mode for multiple non-default variants.
--
--- Patch [1]: [PATCH 1/4] regulator: dt-bindings: Add Silergy SYR82X allowed modes ---
commit 17c0df18a13c2c0dbee697655aab8c718df5c959
Author: Victor Krawiec <victor.krawiec@arturia.com>
regulator: dt-bindings: Add Silergy SYR82X allowed modes
Make the PWM mode configurable from devicetree. Some boards require forced
PWM mode to keep the supply ripple within acceptable limits under light
load conditions.
> diff --git a/include/dt-bindings/regulator/silergy,syr82x.h b/include/dt-bindings/regulator/silergy,syr82x.h
> new file mode 100644
> index 0000000000000..6d4aa86bb5c1d
> --- /dev/null
> +++ b/include/dt-bindings/regulator/silergy,syr82x.h
> @@ -0,0 +1,20 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2026 Arturia - All rights reserved.
> + *
> + * Device Tree binding constants for the Sylergy SYR827 and SYR828 PMIC regulators
[Severity: Low]
This isn't a bug, but there is a typo here ("Sylergy" instead of "Silergy").
> + */
> +
> +#ifndef _DT_BINDINGS_REGULATOR_SYR82X_H
> +#define _DT_BINDINGS_REGULATOR_SYR82X_H
> +
> +/*
> + * Constants to specify regulator modes in device tree for SYR82X regulators
> + * SYR82X_REGULATOR_MODE_FORCE_PWM: Force fixed PWM mode
> + * SYR82X_REGULATOR_MODE_AUTO: Allow auto-PFM mode during light load
> + */
> +
> +#define SYR82X_REGULATOR_MODE_FORCE_PWM 1
> +#define SYR82X_REGULATOR_MODE_AUTO 2
[Severity: Medium]
Will these constants actually be parsed by the regulator core?
Looking at the driver handling the SYR82x regulators, it appears to lack the
.of_map_mode callback:
drivers/regulator/fan53555.c:fan53555_regulator_register() {
...
rdesc->enable_time = di->enable_time;
rdesc->owner = THIS_MODULE;
rdev = devm_regulator_register(di->dev, &di->desc, config);
...
}
Without an of_map_mode callback, won't the regulator core fail to translate
these device tree mode constants, leaving the forced PWM mode non-functional?
[Severity: High]
This is a pre-existing issue, but while reviewing the mode support for this
hardware I noticed that fan53555_set_mode() might be corrupting registers:
drivers/regulator/fan53555.c:fan53555_set_mode() {
...
case REGULATOR_MODE_NORMAL:
regmap_update_bits(rdev->regmap, di->vol_reg, di->mode_mask, 0);
break;
...
}
Does this incorrectly clear the mode mask on di->vol_reg instead of
di->mode_reg?
For variants like FAN53526_VENDOR_TCS where these point to different
registers, could this drop the voltage or disable the regulator entirely
when changing to normal mode?
> +
> +#endif
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260715155141.128601-1-victor.krawiec@arturia.com?part=1
next prev parent reply other threads:[~2026-07-15 16:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 15:51 [PATCH 0/4] Configure SYR82X regulator modes via device tree Victor Krawiec
2026-07-15 15:51 ` [PATCH 1/4] regulator: dt-bindings: Add Silergy SYR82X allowed modes Victor Krawiec
2026-07-15 16:02 ` sashiko-bot [this message]
2026-07-15 15:51 ` [PATCH 2/4] arm64: dts: rk3399-rock-4c-plus: Use device tree bindings constants for SYR828 regulator initial mode Victor Krawiec
2026-07-15 15:51 ` [PATCH 3/4] arm64: dts: rockchip: rk3399-hugsun-x99: Update SYR828 regulator initial mode to use device tree bindings constants Victor Krawiec
2026-07-15 15:51 ` [PATCH 4/4] regulator: fan53555: Add support for mode operations on Silergy devices Victor Krawiec
2026-07-15 16:02 ` 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=20260715160228.F2FB01F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=victor.krawiec@arturia.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