summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorRavi Chandra Sadineni <ravisadineni@chromium.org>2019-08-31 01:14:04 +0200
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-09-12 16:01:35 +0200
commit0144c00ed86bc34b8318268fb63f10ecccf0445c (patch)
tree37f27982905d8d1321598510b0e38080ed39cf9c /drivers/platform
parentMerge tag 'tag-chrome-platform-fixes-for-v5.3-rc6' into for-next (diff)
downloadlinux-0144c00ed86bc34b8318268fb63f10ecccf0445c.tar.xz
linux-0144c00ed86bc34b8318268fb63f10ecccf0445c.zip
platform/chrome: chromeos_tbmc: Report wake events
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 chromeos_tbmc is the wake source. Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/chrome/chromeos_tbmc.c2
1 files changed, 2 insertions, 0 deletions
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;
}