Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: David Heidelberg <david@ixit.cz>, linux-input@vger.kernel.org
Subject: Re: [PATCH v2] Input: s6sy761 - fix resume ordering and restore sensing
Date: Tue, 29 Sep 2026 22:14:44 -0700	[thread overview]
Message-ID: <aryaRAaXNJTv0yUG@google.com> (raw)
In-Reply-To: <20260926203744.82FAA1F000FF@smtp.kernel.org>

On Sat, Sep 26, 2026 at 08:37:44PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] input: permanent IRQ disable on s6sy761_power_on() failure
> --
> 
> commit e5e3e44a0960351c54b4dc02894567b7b504952c
> Author: David Heidelberg <david@ixit.cz>
> 
> Input: s6sy761 - fix resume ordering and restore sensing
> 
> This commit alters the resume ordering to power on the controller before
> unmasking the interrupt, addressing an issue where the boot-complete
> event was consumed prematurely. It also ensures SENSE_ON is re-sent upon
> resume if the input device is already open.
> 
> > diff --git a/drivers/input/touchscreen/s6sy761.c b/drivers/input/touchscreen/s6sy761.c
> > index 0f24a9b730635..899c179fb2d31 100644
> > --- a/drivers/input/touchscreen/s6sy761.c
> > +++ b/drivers/input/touchscreen/s6sy761.c
> > @@ -500,10 +500,22 @@ static int s6sy761_suspend(struct device *dev)
> >  static int s6sy761_resume(struct device *dev)
> >  {
> >  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
> > +	int err;
> > +
> > +	err = s6sy761_power_on(sdata);
> > +	if (err)
> > +		return err;
> 
> [Severity: Medium]
> Will this early return permanently disable the interrupt if power on fails?
> 
> If s6sy761_power_on() fails (for example, due to a transient I2C error
> during resume), this early return skips enable_irq(). However, the PM core
> will still clear the suspended state despite the error.

It looks like the PM core never implemented properly trackign device
state and not calling suspend on devices that has not resumed. That
means that we need to do it ourselves. We definitely do not want to keep
interrupts enabled if powering up the device failed.

I'll send out a patch fixing this.

Thanks.

-- 
Dmitry

  reply	other threads:[~2026-09-30  5:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 20:26 [PATCH v2] Input: s6sy761 - fix resume ordering and restore sensing David Heidelberg via B4 Relay
2026-09-26 20:37 ` sashiko-bot
2026-09-30  5:14   ` Dmitry Torokhov [this message]
2026-09-28  4:38 ` Dmitry Torokhov

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=aryaRAaXNJTv0yUG@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=david@ixit.cz \
    --cc=linux-input@vger.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