lkml.org 
[lkml]   [2019]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] platform/chrome: chromeos_tbmc : Report wake events.
From
Date
Hi,

On 31/8/19 1:14, Ravi Chandra Sadineni wrote:
> Mark chromeos_tbmc as wake capable and report wake events. This helps to
> abort suspend on seeing a tablet mode switch event when kernel is
> suspending. This also helps identifying if chroemos_tbmc is the wake
> source.
>
> Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>

Applied for 5.4, the patches went to linux-next some time ago but sorry for late
reply.

Thanks,
Enric

> ---
> drivers/platform/chrome/chromeos_tbmc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/chrome/chromeos_tbmc.c b/drivers/platform/chrome/chromeos_tbmc.c
> index ce259ec9f990..d1cf8f3463ce 100644
> --- a/drivers/platform/chrome/chromeos_tbmc.c
> +++ b/drivers/platform/chrome/chromeos_tbmc.c
> @@ -47,6 +47,7 @@ static __maybe_unused int chromeos_tbmc_resume(struct device *dev)
>
> static void chromeos_tbmc_notify(struct acpi_device *adev, u32 event)
> {
> + acpi_pm_wakeup_event(&adev->dev);
> switch (event) {
> case 0x80:
> chromeos_tbmc_query_switch(adev, adev->driver_data);
> @@ -90,6 +91,7 @@ static int chromeos_tbmc_add(struct acpi_device *adev)
> dev_err(dev, "cannot register input device\n");
> return ret;
> }
> + device_init_wakeup(dev, true);
> return 0;
> }
>
>

\
 
 \ /
  Last update: 2019-09-19 15:04    [W:0.139 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site