mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Heidelberg <david@ixit.cz>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: s6sy761 - fix error handling in power management paths
Date: Wed, 30 Sep 2026 09:26:10 -0700	[thread overview]
Message-ID: <ar039bFIInczb0o4@google.com> (raw)
In-Reply-To: <3c06e10d-7259-4b7b-982c-f31c3779506f@ixit.cz>

On Wed, Sep 30, 2026 at 06:15:29PM +0200, David Heidelberg wrote:
> On 30/09/2026 07:18, Dmitry Torokhov wrote:
> > In s6sy761_power_on(), if any of the I2C operations or status checks
> > fail after enabling the regulators, the function returns an error while
> > leaving the regulators enabled. Conversely, in s6sy761_resume(), if
> > powering on the controller fails, enable_irq() is skipped while the PM
> > core still marks the device as resumed. A subsequent system suspend or
> > driver unbind then invokes s6sy761_power_off() again, attempting to
> > disable already disabled regulators and incrementing the IRQ disable
> > depth a second time, which leaves the interrupt permanently disabled on
> > later resumes. Additionally, if restoring sensing in s6sy761_resume()
> > fails, the controller is left powered on.
> > 
> > Track whether the controller is powered up with a powered_up flag,
> > unwind regulator enablement on error in s6sy761_power_on(), move
> > disable_irq() to s6sy761_suspend() so it is only called during system
> > sleep when the controller is powered up, and power off the controller
> > if restoring sensing fails during resume.
> > 
> > Reported-by: sashiko-bot@kernel.org
> > Assisted-by: LLM
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
> >   drivers/input/touchscreen/s6sy761.c | 59 +++++++++++++++++++++--------
> >   1 file changed, 43 insertions(+), 16 deletions(-)
> > 
> 
> +<<<<<<< HEAD
>         return s6sy761_power_on(sdata);
> +=======
> +       return 0;
> +
> +err_power_off:
> +       s6sy761_power_off(sdata);
> +       return err;
> +>>>>>>> Input: s6sy761 - fix error handling in power management paths
> 
> doesn't apply cleanly on linux-next, against which branch was it build? (I
> don't see anything touch it in input)

It's on top of your change, I just pushed my queue out, should be in
next next.

Thanks.

-- 
Dmitry

      reply	other threads:[~2026-09-30 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  5:18 Dmitry Torokhov
2026-09-30 16:15 ` David Heidelberg
2026-09-30 16:26   ` Dmitry Torokhov [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=ar039bFIInczb0o4@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=david@ixit.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®