Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jishnu Prakash" <jishnu.prakash@oss.qualcomm.com>
Cc: mfd@lists.linux.dev, devicetree@vger.kernel.org, robh@kernel.org,
	conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v4 3/7] regulator: pm8008: Add mode voting support for PM8010
Date: Wed, 11 Nov 2026 17:27:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-209409@kernel.org> (raw)
In-Reply-To: <20261111-pm8010_i2c_support-v4-3-4549cab1c8e4@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] regulator: pm8008: wrong hpm_min_load_uA for PM8010 L1/L2 in
  pm8010_reg_data
--

commit e894320c5a690e879a2556e289265d1ae5f7176f
Author: Dhruvin Rajpura <drajpura@qti.qualcomm.com>

regulator: pm8008: Add mode voting support for PM8010

This commit adds set_mode, get_mode, and get_optimum_mode support for
PM8010 LDO1 and LDO2 in the pm8008 regulator driver.

> diff --git a/drivers/regulator/qcom-pm8008-regulator.c b/drivers/regulator/qcom-pm8008-regulator.c
> index 0ea4ac016dc22..395d5582f6af0 100644
> --- a/drivers/regulator/qcom-pm8008-regulator.c
> +++ b/drivers/regulator/qcom-pm8008-regulator.c

[ ... ]

> @@ -84,9 +97,10 @@ static const struct pm8008_regulator_data pm8008_reg_data[] = {
>  	PM8008_REGULATOR("ldo7", "vdd-l7",    0x4600, 200000, pm8008_pldo_ranges),
>  };
>  
> +/* LPM setting is supported for only N-type LDOs of PM8010 (L1 and L2) */
>  static const struct pm8008_regulator_data pm8010_reg_data[] = {
> -	PM8008_REGULATOR("ldo1", "vdd-l1-l2", 0x4000, 172000, pm8010_nldo_ranges),
> -	PM8008_REGULATOR("ldo2", "vdd-l1-l2", 0x4100, 172000, pm8010_nldo_ranges),
> +	PM8010_REGULATOR("ldo1", "vdd-l1-l2", 0x4000, 172000, pm8010_nldo_ranges, 100000),
> +	PM8010_REGULATOR("ldo2", "vdd-l1-l2", 0x4100, 172000, pm8010_nldo_ranges, 100000),

[Severity: Medium]
Should hpm_min_load_uA for ldo1 and ldo2 in pm8010_reg_data be 30000
instead of 100000?

In drivers/regulator/qcom-rpmh-regulator.c, pm8010_vreg_data defines the
same PM8010 LDO1 and LDO2 regulators using pmic5_nldo502, which sets
hpm_min_load_uA to 30000 (30 mA):

drivers/regulator/qcom-rpmh-regulator.c:pmic5_nldo502 {
    ...
	.hpm_min_load_uA = 30000,
	.pmic_mode_map = pmic_mode_map_pmic5_ldo,
    ...
}

With hpm_min_load_uA set to 100000, pm8010_regulator_get_optimum_mode()
keeps LDO1 and LDO2 in REGULATOR_MODE_IDLE (LDO_MODE_LPM) when consumers
request loads between 30000 uA and 99999 uA via regulator_set_load(),
which can cause output droop or brownout under moderate loads.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-pm8010_i2c_support-v4-0-4549cab1c8e4@oss.qualcomm.com?part=3

  reply	other threads:[~2026-11-11 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 17:02 [PATCH v4 0/7] mfd: qcom-pm8008: Add support for PM8010 over I2C Jishnu Prakash
2026-11-11 17:02 ` [PATCH v4 1/7] dt-bindings: mfd: pm8008: Add qcom,pm8010-i2c compatible Jishnu Prakash
2026-11-11 17:02 ` [PATCH v4 2/7] regulator: pm8008: Add PM8010 support Jishnu Prakash
2026-11-11 17:02 ` [PATCH v4 3/7] regulator: pm8008: Add mode voting support for PM8010 Jishnu Prakash
2026-11-11 17:27   ` sashiko-bot [this message]
2026-11-11 17:02 ` [PATCH v4 4/7] mfd: qcom-pm8008: Drop GPIO support Jishnu Prakash
2026-11-11 17:02 ` [PATCH v4 5/7] mfd: qcom-pm8008: Add PM8010 support Jishnu Prakash
2026-11-11 17:02 ` [PATCH v4 6/7] dt-bindings: mfd: pm8008: Make interrupts optional Jishnu Prakash
2026-11-11 17:02 ` [PATCH v4 7/7] mfd: qcom-pm8008: Tolerate missing interrupt Jishnu Prakash

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-209409@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --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