All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: chromeos_tbmc : Report wake events.
@ 2019-08-30 23:14 Ravi Chandra Sadineni
  2019-09-04  8:09 ` Enric Balletbo i Serra
  2019-09-19 13:03 ` Enric Balletbo i Serra
  0 siblings, 2 replies; 3+ messages in thread
From: Ravi Chandra Sadineni @ 2019-08-30 23:14 UTC (permalink / raw)
  To: bleung, enric.balletbo, swboyd, tbroch, linux-kernel
  Cc: Ravi Chandra Sadineni

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>
---
 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;
 }
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: chromeos_tbmc : Report wake events.
  2019-08-30 23:14 [PATCH] platform/chrome: chromeos_tbmc : Report wake events Ravi Chandra Sadineni
@ 2019-09-04  8:09 ` Enric Balletbo i Serra
  2019-09-19 13:03 ` Enric Balletbo i Serra
  1 sibling, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2019-09-04  8:09 UTC (permalink / raw)
  To: Ravi Chandra Sadineni, bleung, swboyd, tbroch, linux-kernel

Hi Ravi,

Many thanks for this patch.

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>

The patch looks good to me, I'll wait a bit before pick the patch for I can get
a Tested-by from someone as I don't think I have the hardware to test this (no
x86/tablet devices on my hand)

For my own reference:
 Acked-for-chrome-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

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;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/chrome: chromeos_tbmc : Report wake events.
  2019-08-30 23:14 [PATCH] platform/chrome: chromeos_tbmc : Report wake events Ravi Chandra Sadineni
  2019-09-04  8:09 ` Enric Balletbo i Serra
@ 2019-09-19 13:03 ` Enric Balletbo i Serra
  1 sibling, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2019-09-19 13:03 UTC (permalink / raw)
  To: Ravi Chandra Sadineni, bleung, swboyd, tbroch, linux-kernel

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;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-19 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 23:14 [PATCH] platform/chrome: chromeos_tbmc : Report wake events Ravi Chandra Sadineni
2019-09-04  8:09 ` Enric Balletbo i Serra
2019-09-19 13:03 ` Enric Balletbo i Serra

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.