Skip to content

Commit 0144c00

Browse files
Ravi Chandra SadineniEnric Balletbo i Serra
authored andcommitted
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 <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
1 parent 0187113 commit 0144c00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/platform/chrome/chromeos_tbmc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static __maybe_unused int chromeos_tbmc_resume(struct device *dev)
4747

4848
static void chromeos_tbmc_notify(struct acpi_device *adev, u32 event)
4949
{
50+
acpi_pm_wakeup_event(&adev->dev);
5051
switch (event) {
5152
case 0x80:
5253
chromeos_tbmc_query_switch(adev, adev->driver_data);
@@ -90,6 +91,7 @@ static int chromeos_tbmc_add(struct acpi_device *adev)
9091
dev_err(dev, "cannot register input device\n");
9192
return ret;
9293
}
94+
device_init_wakeup(dev, true);
9395
return 0;
9496
}
9597

0 commit comments

Comments
 (0)