All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Abdur Rofik" <rofikcoga@gmail.com>
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-input@vger.kernel.org, robh@kernel.org,
	conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 08/10] arm64: dts: qcom: sm8250-lg-timelm: add SW42902 touchscreen
Date: Wed, 18 Nov 2026 12:27:09 +0000	[thread overview]
Message-ID: <sashiko-outbox-220912@kernel.org> (raw)
In-Reply-To: <20261118120714.31505-9-rofikcoga@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] Input: sw42902: unbalanced regulator_bulk_disable() in
  sw42902_power_off()
--

commit 675fc0153d8629f5c836725c06a791bb2e0ad680
Author: Abdur Rofik <rofikcoga@gmail.com>

arm64: dts: qcom: sm8250-lg-timelm: add SW42902 touchscreen

This commit adds the SW42902 touchscreen node on I2C13 along with its fixed
regulator supplies and interrupt pinctrl state for the LG V60 ThinQ 5G
(timelm).

> diff --git a/arch/arm64/boot/dts/qcom/sm8250-lg-timelm.dts b/arch/arm64/boot/dts/qcom/sm8250-lg-timelm.dts
> index d307a52cd0e62..be5b894b677bb 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-lg-timelm.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8250-lg-timelm.dts

[ ... ]

> @@ -461,6 +479,29 @@ zap-shader {
>  	};
>  };
>  
> +&i2c13 {
> +	status = "okay";
> +	clock-frequency = <400000>;
> +
> +	touchscreen@48 {
> +		compatible = "lg,sw42902";
> +		reg = <0x48>;
> +
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <39 IRQ_TYPE_LEVEL_LOW>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ts_int_default>;
> +
> +		reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
> +		vcl-supply = <&reg_ts_vcl>;
> +		vdd-supply = <&reg_ts_vdd>;

[Severity: Medium]
Can binding this node trigger an unbalanced regulator_bulk_disable() on
ts->supplies in the driver added by commit "Input: touchscreen: add Silicon
Works SW42902 support"?

sw42902_probe() registers the sw42902_power_off() devres action right after
devm_regulator_bulk_get(), before sw42902_power_on() enables the vcl and vdd
regulators:

drivers/input/touchscreen/sw42902.c:sw42902_probe() {
	...
	error = devm_regulator_bulk_get(dev, ARRAY_SIZE(ts->supplies), ts->supplies);
	if (error)
		return dev_err_probe(dev, error, "failed to get regulators\n");

	error = devm_add_action_or_reset(dev, sw42902_power_off, ts);
	if (error)
		return error;
	...
	error = sw42902_power_on(ts);
	if (error)
		return error;
	...
}

If an intermediate call such as devm_request_threaded_irq() or
regulator_bulk_enable() inside sw42902_power_on() fails, devres runs
sw42902_power_off() and calls regulator_bulk_disable() on supplies that were
never enabled, underflowing the regulator enable count and triggering a
WARN_ON() in _regulator_disable().  Unbinding the device while suspended has
the same effect because sw42902_suspend() already called sw42902_power_off()
without tracking power state in sw42902_power_off().

Registering the devres action after sw42902_power_on() succeeds and skipping
sw42902_power_off() when ts->suspended is set would avoid disabling
already-disabled regulators.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118120714.31505-1-rofikcoga@gmail.com?part=8

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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 12:07 [PATCH v2 00/10] arm64: dts: qcom: add LG V60 ThinQ 5G (timelm) support Abdur Rofik
2026-11-18 12:07 ` [PATCH v2 01/10] dt-bindings: arm: qcom: add LG V60 ThinQ 5G (timelm) Abdur Rofik
2026-11-18 12:07 ` [PATCH v2 02/10] arm64: dts: qcom: add LG V60 ThinQ 5G (timelm) support Abdur Rofik
2026-11-18 12:36   ` sashiko-bot
2026-11-18 12:07 ` [PATCH v2 03/10] dt-bindings: display: panel: add LG SW43103 Abdur Rofik
2026-11-18 12:07 ` [PATCH v2 04/10] drm/panel: add LG SW43103 panel driver Abdur Rofik
2026-11-18 12:07 ` [PATCH v2 05/10] dt-bindings: input: touchscreen: add Silicon Works SW42902 Abdur Rofik
2026-11-18 12:07 ` [PATCH v2 06/10] Input: touchscreen: add Silicon Works SW42902 support Abdur Rofik
2026-11-18 12:17   ` sashiko-bot
2026-11-18 12:07 ` [PATCH v2 07/10] arm64: dts: qcom: sm8250-lg-timelm: enable SW43103 panel Abdur Rofik
2026-11-18 12:26   ` sashiko-bot
2026-11-18 12:07 ` [PATCH v2 08/10] arm64: dts: qcom: sm8250-lg-timelm: add SW42902 touchscreen Abdur Rofik
2026-11-18 12:27   ` sashiko-bot [this message]
2026-11-18 12:07 ` [PATCH v2 09/10] arm64: dts: qcom: sm8250-lg-timelm: enable USB Type-C Abdur Rofik
2026-11-18 12:07 ` [PATCH v2 10/10] arm64: dts: qcom: sm8250-lg-timelm: add QCA6390 Bluetooth Abdur Rofik

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-220912@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-input@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rofikcoga@gmail.com \
    --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.