From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Kamal Wadhwa <quic_kamalw@quicinc.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jishnu Prakash <quic_jprakash@quicinc.com>,
Rakesh Kota <quic_kotarake@quicinc.com>,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] Input: gpio-keys - fix un-responsive keys issue on hibernate exit
Date: Fri, 18 Oct 2024 12:01:35 -0700 [thread overview]
Message-ID: <ZxKwj8RFXFmdiVi2@google.com> (raw)
In-Reply-To: <20241018-unresponsive-gpio-keys-hibernate-v1-1-12f5e9962054@quicinc.com>
Hi Kamal,
On Fri, Oct 18, 2024 at 06:22:35PM +0530, Kamal Wadhwa wrote:
> GPIO IRQ setting may get reset during hibernate mode, as device
> is completely powered off. This can cause the GPIO keys to become
> un-responsive after hibernate-exit.
>
> To fix this problem, re-request IRQs in restore() callback, in the
> hibernate exit flow.
No, absolutely not. GPIO state and configuration is owned by GPIO
controller and it should be the entity tasked with restoring the
configuration after hibernation. Individual GPIO consumers need not do
that. Same goes for coprocessor and what's not.
Also, as a side statement: whenever you call devm API outside of probe
and remove path you are likely introduce bugs, because that interferes
with the original order of acquisition of the resources so order of
releasing them during unbinding of the device from the driver will
likely be wrong.
Thanks.
--
Dmitry
prev parent reply other threads:[~2024-10-18 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 12:52 [PATCH] Input: gpio-keys - fix un-responsive keys issue on hibernate exit Kamal Wadhwa
2024-10-18 19:01 ` 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=ZxKwj8RFXFmdiVi2@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_jprakash@quicinc.com \
--cc=quic_kamalw@quicinc.com \
--cc=quic_kotarake@quicinc.com \
/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;
as well as URLs for NNTP newsgroup(s).