From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Qianhui Xu" <xiaqinghuan@mail.ustc.edu.cn>, <lee@kernel.org>,
<pavel@kernel.org>
Cc: <robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
<quic_fenglinw@quicinc.com>, <linux-arm-msm@vger.kernel.org>,
<linux-leds@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] dt-bindings: leds: qcom,spmi-flash-led: document battery supply properties
Date: Tue, 01 Dec 2026 13:52:24 +0100 [thread overview]
Message-ID: <DN9ES9WQ5M0A.14IHQ8U8RREL9@fairphone.com> (raw)
In-Reply-To: <20261201120403.2467722-1-xiaqinghuan@mail.ustc.edu.cn>
On Tue Dec 1, 2026 at 1:04 PM CET, Qianhui Xu wrote:
> The driver (drivers/leds/flash/leds-qcom-flash.c) already consumes three
> DT properties that the binding does not declare:
>
> - "power-supplies" (qcom_flash_get_battery(): fwnode reference used to
> locate the battery power supply that backs flash operation),
> - "qcom,battery-current-limit-microamp" (read at
> leds-qcom-flash.c:248, clamped by FLASH_BATTERY_CURRENT_MAX_UA),
> - "qcom,battery-voltage-min-microvolt" (read at
> leds-qcom-flash.c:256).
All of these three claims are completely bogus. Either your LLM is very
badly hallucinating or you run this on a completely different source
tree.
Regards
Luca
> DT nodes that wire these properties therefore fail dtbs_check with
> "do not match any of the regexes". Document them, require the two
> qcom,battery-* limits whenever "power-supplies" is present, and forbid
> the limits on their own. No DT or driver change.
>
> Found while auditing a board that enables qcom,pm8550-flash-led with a
> battery-backed flash.
>
> Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
> ---
> *** AI-assistance disclosure ***
> This patch was prepared with the help of an LLM coding assistant. The
> author reviewed every line, checked every quoted claim against the tree,
> and ran the gates recorded in the send report; the design decisions and
> any errors are the author's.
>
> diff --git a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
> index 3bfa24ff5..e65630d8d 100644
> --- a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
> +++ b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
> @@ -36,6 +36,35 @@ properties:
> reg:
> maxItems: 1
>
> + power-supplies:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Provider of the battery supplying the flash controller. If the provider
> + exposes multiple power supplies, exactly one must be of battery type.
> + The battery must supply open-circuit voltage, current and internal resistance.
> +
> + qcom,battery-current-limit-microamp:
> + description: Maximum battery discharge current allowed during a flash.
> + minimum: 1
> + maximum: 4500000
> +
> + qcom,battery-voltage-min-microvolt:
> + description: Minimum loaded battery voltage, including the required droop margin.
> + minimum: 1
> +
> +allOf:
> + - if:
> + required:
> + - power-supplies
> + then:
> + required:
> + - qcom,battery-current-limit-microamp
> + - qcom,battery-voltage-min-microvolt
> +
> +dependentRequired:
> + qcom,battery-current-limit-microamp: [power-supplies]
> + qcom,battery-voltage-min-microvolt: [power-supplies]
> +
> patternProperties:
> "^led-[0-3]$":
> type: object
prev parent reply other threads:[~2026-12-01 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 12:04 Qianhui Xu
2026-12-01 12:52 ` Luca Weiss [this message]
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=DN9ES9WQ5M0A.14IHQ8U8RREL9@fairphone.com \
--to=luca.weiss@fairphone.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=quic_fenglinw@quicinc.com \
--cc=robh@kernel.org \
--cc=xiaqinghuan@mail.ustc.edu.cn \
/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
all inboxes | Powered by JetHome®