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 v6 3/8] dt-bindings: mfd: pm8008: Add mode constants for PM8010 regulators
Date: Fri, 04 Dec 2026 06:00:51 +0000	[thread overview]
Message-ID: <sashiko-outbox-249170@kernel.org> (raw)
In-Reply-To: <20261204-pm8010_i2c_support-v6-3-55c4146e1bd4@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dt-bindings: mfd: pm8008: undocumented PM8010 mode values and
  header scope
--

commit d1161f38707ebd4b5977a3b2b2e9d724a8277a5c
Author: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>

dt-bindings: mfd: pm8008: Add mode constants for PM8010 regulators

This commit adds regulator mode macros for PM8010 in a new header and
constrains regulator-allowed-modes and regulator-initial-mode to LDO1
and LDO2 in the qcom,pm8008 binding.

> diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
> index 2701aa755f310..64d4e26d16fa7 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
> @@ -82,11 +82,42 @@ properties:
>      type: object
>      additionalProperties: false
>      patternProperties:
> -      "^ldo[1-7]$":
> +      "^ldo[1-2]$":
>          type: object
>          $ref: /schemas/regulator/regulator.yaml#
> +
> +        properties:
> +          regulator-allowed-modes:
> +            items:
> +              enum: [ 0, 1 ]
> +          regulator-initial-mode:
> +            enum: [ 0, 1 ]
> +        unevaluatedProperties: false

[ ... ]

> diff --git a/include/dt-bindings/regulator/qcom,pm8008-regulator.h b/include/dt-bindings/regulator/qcom,pm8008-regulator.h
> new file mode 100644
> index 0000000000000..26d5d5c427c96
> --- /dev/null
> +++ b/include/dt-bindings/regulator/qcom,pm8008-regulator.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
> +
> +#ifndef __QCOM_PM8008_REGULATOR_H
> +#define __QCOM_PM8008_REGULATOR_H
> +
> +/*
> + * These constants may be used to specify modes for PM8010 regulator device
> + * tree properties.
> + *
> + * PM8010_REGULATOR_MODE_LPM: Low power mode in which a small load current
> + *				is allowed.
> + * PM8010_REGULATOR_MODE_NPM: Normal power mode in which the full rated
> + *				current of the LDO is allowed.
> + */
> +#define PM8010_REGULATOR_MODE_LPM		0
> +#define PM8010_REGULATOR_MODE_NPM		1

[Severity: Low]
Should regulator-allowed-modes and regulator-initial-mode in
qcom,pm8008.yaml document what values 0 and 1 represent and reference
include/dt-bindings/regulator/qcom,pm8008-regulator.h?

regulator.yaml expects each device binding to explain its supported mode
values, and without a description or header reference a reader of
qcom,pm8008.yaml cannot tell what 0 and 1 mean or locate the new header.

Also, could the comment in qcom,pm8008-regulator.h clarify that these
constants apply only to I2C-connected PM8010 (qcom,pm8010-i2c)?

RPMh-managed PM8010 (qcom,pm8010-rpmh-regulators) uses
qcom,rpmh-regulator.h with different values (RPMH_REGULATOR_MODE_RET is
0 and RPMH_REGULATOR_MODE_LPM is 1), so the unscoped PM8010 comment can
easily be misread.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-pm8010_i2c_support-v6-0-55c4146e1bd4@oss.qualcomm.com?part=3

  reply	other threads:[~2026-12-04  6:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  5:50 [PATCH v6 0/8] mfd: qcom-pm8008: Add support for PM8010 over I2C Jishnu Prakash
2026-12-04  5:50 ` [PATCH v6 1/8] dt-bindings: mfd: pm8008: Add qcom,pm8010-i2c compatible Jishnu Prakash
2026-12-04  5:50 ` [PATCH v6 2/8] regulator: pm8008: Add PM8010 support Jishnu Prakash
2026-12-04  5:50 ` [PATCH v6 3/8] dt-bindings: mfd: pm8008: Add mode constants for PM8010 regulators Jishnu Prakash
2026-12-04  6:00   ` sashiko-bot [this message]
2026-12-04  5:50 ` [PATCH v6 4/8] regulator: pm8008: Add mode voting support for PM8010 Jishnu Prakash
2026-12-04  5:58   ` sashiko-bot
2026-12-04  5:50 ` [PATCH v6 5/8] mfd: qcom-pm8008: Drop GPIO support Jishnu Prakash
2026-12-04  5:50 ` [PATCH v6 6/8] mfd: qcom-pm8008: Add PM8010 support Jishnu Prakash
2026-12-04  5:50 ` [PATCH v6 7/8] dt-bindings: mfd: pm8008: Make interrupts optional Jishnu Prakash
2026-12-04  6:13   ` sashiko-bot
2026-12-04  5:50 ` [PATCH v6 8/8] mfd: qcom-pm8008: Tolerate missing interrupt Jishnu Prakash
2026-12-04  6:04   ` 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-249170@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