From: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"sashal@kernel.org" <sashal@kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Kelley <mikelley@microsoft.com>
Subject: Re: [PATCH] Input: hyperv-keyboard: Add the support of hibernation
Date: Thu, 19 Sep 2019 09:17:52 -0700 [thread overview]
Message-ID: <20190919161752.GS237523@dtor-ws> (raw)
In-Reply-To: <1568244975-66795-1-git-send-email-decui@microsoft.com>
Hi Dexuan,
On Wed, Sep 11, 2019 at 11:36:20PM +0000, Dexuan Cui wrote:
> We need hv_kbd_pm_notify() to make sure the pm_wakeup_hard_event() call
> does not prevent the system from entering hibernation: the hibernation
> is a relatively long process, which can be aborted by the call
> pm_wakeup_hard_event(), which is invoked upon keyboard events.
>
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
> ---
>
> This patch is basically a pure Hyper-V specific change and it has a
> build dependency on the commit 271b2224d42f ("Drivers: hv: vmbus: Implement
> suspend/resume for VSC drivers for hibernation"), which is on Sasha Levin's
> Hyper-V tree's hyperv-next branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/log/?h=hyperv-next
>
> I request this patch should go through Sasha's tree rather than the
> input subsystemi's tree.
>
> Hi Dmitry, can you please Ack?
>
> drivers/input/serio/hyperv-keyboard.c | 68 ++++++++++++++++++++++++++++++++---
> 1 file changed, 63 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c
> index 88ae7c2..277dc4c 100644
> --- a/drivers/input/serio/hyperv-keyboard.c
> +++ b/drivers/input/serio/hyperv-keyboard.c
> @@ -10,6 +10,7 @@
> #include <linux/hyperv.h>
> #include <linux/serio.h>
> #include <linux/slab.h>
> +#include <linux/suspend.h>
>
> /*
> * Current version 1.0
> @@ -95,6 +96,9 @@ struct hv_kbd_dev {
> struct completion wait_event;
> spinlock_t lock; /* protects 'started' field */
> bool started;
> +
> + struct notifier_block pm_nb;
> + bool hibernation_in_progress;
Why do you use notifier block instead of exposing proper PM methods if
you want to support hibernation?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2019-09-19 16:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 23:36 [PATCH] Input: hyperv-keyboard: Add the support of hibernation Dexuan Cui
2019-09-19 16:17 ` dmitry.torokhov [this message]
2019-09-21 6:56 ` Dexuan Cui
2019-09-25 19:49 ` Dexuan Cui
2019-09-28 0:31 ` dmitry.torokhov
2019-09-28 0:31 ` dmitry.torokhov
2019-09-30 22:09 ` Dexuan Cui
2019-09-30 22:09 ` Dexuan Cui
2019-09-30 23:06 ` dmitry.torokhov
2019-09-30 23:06 ` dmitry.torokhov
2019-10-03 5:35 ` Dexuan Cui
2019-10-03 5:35 ` Dexuan Cui
2019-10-03 6:44 ` Dexuan Cui
2019-10-03 6:44 ` Dexuan Cui
2019-10-03 17:45 ` dmitry.torokhov
2019-10-03 17:45 ` dmitry.torokhov
2019-10-03 18:18 ` Dexuan Cui
2019-10-03 18:18 ` Dexuan Cui
2019-11-05 5:18 ` Dexuan Cui
2019-11-05 5:43 ` Dexuan Cui
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=20190919161752.GS237523@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.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).