All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Martin <hemisputnik@proton.me>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: msm8917-xiaomi-wingtech: enable flash LED
Date: Sat, 12 Sep 2026 13:49:10 +0000	[thread overview]
Message-ID: <20260912134910.A19E81F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260912134056.3347741-1-hemisputnik@proton.me>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Setting 'output-high' in the pinctrl default state drives the flash LED pins high, turning on the LED at maximum brightness during boot and bypassing safety timeouts.
- [Low] The new compatible string "sgmicro,sgm3780" is used but not documented in the YAML bindings.
- [Low] Missing `flash-max-timeout-us` property causes an unconditional kernel warning on boot.
--

commit 900520fbc3c9b249fa3d066d01078e01c28af4a8
Author: hemisputnik <hemisputnik@proton.me>

arm64: dts: qcom: msm8917-xiaomi-wingtech: enable flash LED

This commit adds the SGM3780 flash LED controller to the msm8917-xiaomi-wingtech
device tree. It falls back to the existing sgm3140 driver compatibility to
enable torch functionality.

> diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
> index 69eda5f42c069..c0b5094efced3 100644
> --- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
[ ... ]
> @@ -25,6 +26,20 @@ pwm_backlight: backlight {
>  		default-brightness-level = <128>;
>  	};
>  
> +	flash-led-controller {
> +		compatible = "sgmicro,sgm3780", "sgmicro,sgm3140";

[Severity: Low]
Will make dtbs_check fail with this change? The new compatible string
"sgmicro,sgm3780" doesn't appear to be documented in the YAML bindings yet.

> +		enable-gpios = <&tlmm 93 GPIO_ACTIVE_HIGH>;
> +		flash-gpios = <&tlmm 90 GPIO_ACTIVE_HIGH>;
> +
> +		pinctrl-0 = <&flash_led_default>;
> +		pinctrl-names = "default";
> +
> +		led {
> +			function = LED_FUNCTION_FLASH;
> +			color = <LED_COLOR_ID_WHITE>;

[Severity: Low]
Will this cause a kernel warning on every boot? The sgm3140 driver expects
the flash-max-timeout-us property to be defined in the led child node.

If it is missing, the driver falls back to a default value but emits a
dev_warn during probe, which can unnecessarily pollute the kernel log.

> +		};
> +	};
> +
[ ... ]
> @@ -306,6 +321,14 @@ tsp_int_rst_default: tsp-int-rst-default-state {
>  		drive-strength = <8>;
>  		bias-pull-up;
>  	};
> +
> +	flash_led_default: flash-led-default-state {
> +		pins = "gpio90", "gpio93";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-disable;
> +		output-high;

[Severity: High]
Does configuring output-high here risk permanent hardware damage?

The pinctrl framework applies the flash_led_default state during device
binding, which sets the flash-gpios and enable-gpios pins high before the
driver probes, or permanently if probing is deferred or fails.

This turns on the flash LED at maximum brightness during boot and bypasses
the driver's safety timeouts. Flash LEDs are typically not designed for
continuous operation at high brightness and can quickly overheat.

> +	};
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260912134056.3347741-1-hemisputnik@proton.me?part=1

  reply	other threads:[~2026-09-12 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 13:41 [PATCH] arm64: dts: qcom: msm8917-xiaomi-wingtech: enable flash LED Martin
2026-09-12 13:49 ` sashiko-bot [this message]
2026-09-14  8:40 ` Konrad Dybcio

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=20260912134910.A19E81F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hemisputnik@proton.me \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.