Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jun Yan" <jerrysteve1101@gmail.com>
Cc: robh@kernel.org, dmitry.torokhov@gmail.com,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	conor+dt@kernel.org
Subject: Re: [PATCH v2 5/9] dt-bindings: input: microchip,cap11xx: Add reset-gpios property
Date: Fri, 12 Jun 2026 07:32:53 +0000	[thread overview]
Message-ID: <20260612073253.AB4401F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260612072237.1177304-6-jerrysteve1101@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The threaded interrupt handler returns IRQ_HANDLED even when it fails to clear the hardware interrupt due to I2C errors.
--

commit ace8e5621e0baa976a27041614c9c01f25526d5e
Author: Jun Yan <jerrysteve1101@gmail.com>

dt-bindings: input: microchip,cap11xx: Add reset-gpios property

This commit adds support for the optional reset-gpios property to describe
the active-high reset pin for CAP1126 and CAP1188 devices. It restricts
this property to only these variants, as other variants lack a hardware
reset pin.

> drivers/input/keyboard/cap11xx.c:cap11xx_thread_func() {
> ...
> 	ret = regmap_update_bits(priv->regmap, CAP11XX_REG_MAIN_CONTROL, 1, 0);
> 	if (ret < 0)
> 		goto out;
> 
> 	ret = regmap_read(priv->regmap, priv->model->sensor_input_reg_base, &status);
> 	if (ret < 0)
> 		goto out;
> ...
> out:
> 	return IRQ_HANDLED;
> }

[Severity: High]
This is a pre-existing issue, but does this error path cause an
interrupt storm?

If the I2C operations regmap_update_bits() or regmap_read() fail, the
function jumps to the out label and returns IRQ_HANDLED instead of
returning IRQ_NONE or disabling the IRQ.

Since the IRQ is registered with IRQF_ONESHOT, returning IRQ_HANDLED tells
the IRQ subsystem to unmask the interrupt line. If the interrupt condition
on the hardware was not successfully cleared due to the I2C failure, will
the interrupt immediately fire again?

This could create an infinite loop of threaded IRQ scheduling that bypasses
the kernel's spurious interrupt detector (which requires IRQ_NONE to
trigger), potentially consuming 100% of a CPU core and causing a soft
lockup.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260612072237.1177304-1-jerrysteve1101@gmail.com?part=5

  reply	other threads:[~2026-06-12  7:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12  7:22 [PATCH v2 0/9] Input: cap11xx - Add support for CAP1114 Jun Yan
2026-06-12  7:22 ` [PATCH v2 1/9] Input: cap11xx - clean up duplicate log and add probe error logs Jun Yan
2026-06-12  7:32   ` sashiko-bot
2026-06-12  7:22 ` [PATCH v2 2/9] Input: cap11xx - remove unused register macros Jun Yan
2026-06-12  7:22 ` [PATCH v2 3/9] dt-bindings: input: microchip,cap11xx: Update datasheet URL and LED reg range Jun Yan
2026-06-12  7:22 ` [PATCH v2 4/9] dt-bindings: input: microchip,cap11xx: Add microchip,cap1126 LED reg constraints Jun Yan
2026-06-12  7:22 ` [PATCH v2 5/9] dt-bindings: input: microchip,cap11xx: Add reset-gpios property Jun Yan
2026-06-12  7:32   ` sashiko-bot [this message]
2026-06-12  7:22 ` [PATCH v2 6/9] Input: cap11xx - add reset gpio support Jun Yan
2026-06-12  7:31   ` sashiko-bot
2026-06-12  7:22 ` [PATCH v2 7/9] Input: cap11xx - refactor code for better CAP1114 support Jun Yan
2026-06-12  7:35   ` sashiko-bot
2026-06-12  7:22 ` [PATCH v2 8/9] dt-bindings: input: microchip,cap11xx: Add " Jun Yan
2026-06-12  7:35   ` sashiko-bot
2026-06-12  7:22 ` [PATCH v2 9/9] Input: cap11xx - add support for CAP1114 Jun Yan
2026-06-12  7:42   ` 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=20260612073253.AB4401F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jerrysteve1101@gmail.com \
    --cc=linux-input@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