linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux ACPI <linux-acpi@vger.kernel.org>
Cc: Darren Hart <dvhart@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	Valentin Manea <valy@mrs.ro>
Subject: Re: [PATCH 2/2] platform/x86: surfacepro3: Support for wakeup from suspend-to-idle
Date: Wed, 10 Jan 2018 15:26:56 +0200	[thread overview]
Message-ID: <1515590816.7000.857.camel@linux.intel.com> (raw)
In-Reply-To: <6492549.QWquAG8VGe@aspire.rjw.lan>

On Wed, 2018-01-10 at 13:26 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Modify surface_button_notify() to make it wake up the system from
> suspend-to-idle (by reporting "hard" wakeup events while suspended)
> and add wakeup initialization to surface_button_add() for wakeup
> events reported by this driver to work at all.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=198389
> Reported-by: Valentin Manea <valy@mrs.ro>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Change seems sane to me.

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

(in case you would like to push it through PM tree, otherwise I can take
it)

> ---
>  drivers/platform/x86/surfacepro3_button.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Index: linux-pm/drivers/platform/x86/surfacepro3_button.c
> ===================================================================
> --- linux-pm.orig/drivers/platform/x86/surfacepro3_button.c
> +++ linux-pm/drivers/platform/x86/surfacepro3_button.c
> @@ -119,7 +119,7 @@ static void surface_button_notify(struct
>  	if (key_code == KEY_RESERVED)
>  		return;
>  	if (pressed)
> -		pm_wakeup_event(&device->dev, 0);
> +		pm_wakeup_dev_event(&device->dev, 0, button-
> >suspended);
>  	if (button->suspended)
>  		return;
>  	input_report_key(input, key_code, pressed?1:0);
> @@ -185,6 +185,8 @@ static int surface_button_add(struct acp
>  	error = input_register_device(input);
>  	if (error)
>  		goto err_free_input;
> +
> +	device_init_wakeup(&device->dev, true);
>  	dev_info(&device->dev,
>  			"%s [%s]\n", name, acpi_device_bid(device));
>  	return 0;
> 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

      reply	other threads:[~2018-01-10 13:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 12:22 [PATCH 0/2] Suspend-to-idle fixes for Surface Pro3 Rafael J. Wysocki
2018-01-10 12:26 ` [PATCH 1/2] ACPI / PM: Use Low Power S0 Idle on more systems Rafael J. Wysocki
2018-01-10 13:24   ` Andy Shevchenko
2018-01-10 22:25     ` Rafael J. Wysocki
2018-01-11 12:54       ` Andy Shevchenko
2018-01-11  1:13     ` [PATCH v2 " Rafael J. Wysocki
2018-01-11 12:55       ` Andy Shevchenko
2018-01-10 17:38   ` [PATCH " Mario.Limonciello
2018-01-10 22:22     ` Rafael J. Wysocki
2018-01-11 15:51       ` Mario.Limonciello
2018-01-10 12:26 ` [PATCH 2/2] platform/x86: surfacepro3: Support for wakeup from suspend-to-idle Rafael J. Wysocki
2018-01-10 13:26   ` Andy Shevchenko [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=1515590816.7000.857.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dvhart@infradead.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=valy@mrs.ro \
    /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).