All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Thierry Escande <thierry.escande@collabora.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: cros_ec: Send correct suspend/resume event to EC
Date: Mon, 23 Jan 2017 11:56:10 +0000	[thread overview]
Message-ID: <20170123115610.GG16020@dell> (raw)
In-Reply-To: <1484319872-26816-1-git-send-email-thierry.escande@collabora.com>

On Fri, 13 Jan 2017, Thierry Escande wrote:

> From: Shawn Nematbakhsh <shawnn@chromium.org>
> 
> pm_suspend_via_firmware() will return false for platforms with ACPI
> disabled and ACPI is a prerequisite for S0ix support.
> 
> With this patch, sleep state event sent to EC is forced to S3 if ACPI is
> disabled.
> 
> Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
> Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
> ---
>  drivers/mfd/cros_ec.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
> index b8a5080..9b66a98 100644
> --- a/drivers/mfd/cros_ec.c
> +++ b/drivers/mfd/cros_ec.c
> @@ -190,8 +190,9 @@ int cros_ec_suspend(struct cros_ec_device *ec_dev)
>  	int ret;
>  	u8 sleep_event;
>  
> -	sleep_event = pm_suspend_via_firmware() ? HOST_SLEEP_EVENT_S3_RESUME :
> -						  HOST_SLEEP_EVENT_S0IX_RESUME;
> +	sleep_event = (!IS_ENABLED(CONFIG_ACPI) || pm_suspend_via_firmware()) ?
> +		      HOST_SLEEP_EVENT_S3_RESUME :
> +		      HOST_SLEEP_EVENT_S0IX_RESUME;
>  
>  	ret = cros_ec_sleep_event(ec_dev, sleep_event);
>  	if (ret < 0)
> @@ -224,8 +225,9 @@ int cros_ec_resume(struct cros_ec_device *ec_dev)
>  	ec_dev->suspended = false;
>  	enable_irq(ec_dev->irq);
>  
> -	sleep_event = pm_suspend_via_firmware() ? HOST_SLEEP_EVENT_S3_RESUME :
> -						  HOST_SLEEP_EVENT_S0IX_RESUME;
> +	sleep_event = (!IS_ENABLED(CONFIG_ACPI) || pm_suspend_via_firmware()) ?
> +		      HOST_SLEEP_EVENT_S3_RESUME :
> +		      HOST_SLEEP_EVENT_S0IX_RESUME;
>  
>  	ret = cros_ec_sleep_event(ec_dev, sleep_event);
>  	if (ret < 0)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2017-01-23 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 15:04 [PATCH] mfd: cros_ec: Send correct suspend/resume event to EC Thierry Escande
2017-01-23 11:56 ` Lee Jones [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=20170123115610.GG16020@dell \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.escande@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.