Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ravi Chandra Sadineni and committed by
Enric Balletbo i Serra
0144c00e 01871139

+2
+2
drivers/platform/chrome/chromeos_tbmc.c
··· 47 47 48 48 static void chromeos_tbmc_notify(struct acpi_device *adev, u32 event) 49 49 { 50 + acpi_pm_wakeup_event(&adev->dev); 50 51 switch (event) { 51 52 case 0x80: 52 53 chromeos_tbmc_query_switch(adev, adev->driver_data); ··· 91 90 dev_err(dev, "cannot register input device\n"); 92 91 return ret; 93 92 } 93 + device_init_wakeup(dev, true); 94 94 return 0; 95 95 } 96 96