Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Aleksandrs Vinarskis" <alex@vinarskis.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 3/3] arm64: dts: qcom: x1e80100-dell-xps13-9345: introduce EC
Date: Mon, 26 Oct 2026 00:12:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-184558@kernel.org> (raw)
In-Reply-To: <20261026-dell-xps-9345-ec-v7-3-828ce301b839@vinarskis.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: qcom: level-low EC IRQ with stub dell_xps_ec_irq_handler()
--

commit bdc3996f914e2f3bd3df5f76f45237ab26fd449b
Author: Aleksandrs Vinarskis <alex@vinarskis.com>

arm64: dts: qcom: x1e80100-dell-xps13-9345: introduce EC

This commit enables i2c5 and adds the embedded controller node along with its
interrupt and thermal ADC channels for the Dell XPS 13 9345. It also adds
labels for the known PMK8550 VADC thermal channels.

> diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
> index f48e6bc350063..3f0c17c845b3e 100644
> --- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
> +++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
> @@ -759,8 +759,32 @@ retimer_ss0_con_sbu_out: endpoint {
>  
>  &i2c5 {
>  	clock-frequency = <100000>;
> -	status = "disabled";
> -	/* EC @0x3b */
> +	status = "okay";
> +
> +	embedded-controller@3b {
> +		compatible = "dell,xps13-9345-ec";
> +		reg = <0x3b>;
> +
> +		interrupts-extended = <&tlmm 66 IRQ_TYPE_LEVEL_LOW>;

[Severity: High]
Can configuring this interrupt as IRQ_TYPE_LEVEL_LOW cause an unrecoverable
interrupt storm when the EC asserts gpio66 low (such as on lid close)?

In drivers/platform/arm64/dell-xps-ec.c, dell_xps_ec_probe() requests and
enables client->irq as a oneshot threaded interrupt:

drivers/platform/arm64/dell-xps-ec.c:dell_xps_ec_probe() {
	...
	/* Request IRQ for EC events */
	ret = devm_request_threaded_irq(dev, client->irq, NULL,
					dell_xps_ec_irq_handler,
					IRQF_ONESHOT, dev_name(dev), ec);
	if (ret)
		return dev_err_probe(dev, ret, "Failed to request IRQ\n");
}

However, dell_xps_ec_irq_handler() is currently a stub that logs a debug
message and returns IRQ_HANDLED without performing an I2C read to acknowledge
or clear the pending event on the EC:

drivers/platform/arm64/dell-xps-ec.c:dell_xps_ec_irq_handler() {
	struct dell_xps_ec *ec = data;

	/*
	 * TODO: IRQ is fired on lid-close. Follow Windows example to read out
	 *       the thermistor thresholds and potentially fan speeds.
	 */
	dev_dbg(ec->dev, "IRQ triggered (irq=%d)\n", irq);

	return IRQ_HANDLED;
}

Because the interrupt is level-triggered (IRQ_TYPE_LEVEL_LOW) with
IRQF_ONESHOT, irq_finalize_oneshot() unmasks the line as soon as
dell_xps_ec_irq_handler() returns. If the EC continues holding gpio66 low
because the event was not cleared over I2C, the interrupt will immediately
re-fire in a tight loop.

In addition, because dell_xps_ec_irq_handler() returns IRQ_HANDLED rather
than IRQ_NONE, note_interrupt() in kernel/irq/spurious.c never increments
desc->irqs_unhandled, preventing the spurious IRQ detector from disabling the
interrupt line.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261026-dell-xps-9345-ec-v7-0-828ce301b839@vinarskis.com?part=3

      reply	other threads:[~2026-10-26  0:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 23:56 [PATCH v7 0/3] (no cover subject) Aleksandrs Vinarskis
2026-10-25 23:56 ` [PATCH v7 1/3] dt-bindings: platform: introduce EC for Dell XPS 13 9345 Aleksandrs Vinarskis
2026-10-26  0:02   ` sashiko-bot
2026-10-25 23:56 ` [PATCH v7 2/3] platform: arm64: dell-xps-ec: new driver Aleksandrs Vinarskis
2026-10-26  0:11   ` sashiko-bot
2026-10-25 23:56 ` [PATCH v7 3/3] arm64: dts: qcom: x1e80100-dell-xps13-9345: introduce EC Aleksandrs Vinarskis
2026-10-26  0:12   ` sashiko-bot [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=sashiko-outbox-184558@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alex@vinarskis.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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