Commit graph

5 commits

Author SHA1 Message Date
Ravi Chandra Sadineni
0144c00ed8 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>
2019-09-12 16:01:35 +02:00
Nathan Chancellor
bc3f4b5c60
platform/chrome: chromeos_tbmc - Remove unneeded const
Clang warns:

drivers/platform/chrome/chromeos_tbmc.c:102:14: warning: duplicate
'const' declaration specifier [-Wduplicate-decl-specifier]
static const SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,
             ^
./include/linux/pm.h:365:56: note: expanded from macro
'SIMPLE_DEV_PM_OPS'
                                                       ^
1 warning generated.

SIMPLE_DEV_PM_OPS is already declared as const, this one is unnecessary
so remove it.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
2018-10-09 22:40:12 -07:00
Benson Leung
c474e9f2be
platform/chrome: chromeos_tbmc - fix SPDX identifier
Original submission was GPLv2 only, so mark as GPL-2.0.
Also restored some descriptive lines that were there before.

Signed-off-by: Benson Leung <bleung@chromium.org>
2018-06-16 16:52:59 -07:00
Benson Leung
4574d1d61d
platform/chrome: chromeos_tbmc - add SPDX identifier
Replace the original license statement with the SPDX identifier.
Add also one line of description as recommended by the COPYING file.

Signed-off-by: Benson Leung <bleung@chromium.org>
2018-05-23 12:00:47 -07:00
Gwendal Grignou
b418f74170
platform: chrome: Add Tablet Switch ACPI driver
Add a kernel driver for GOOG0006, an ACPI driver reporting an event when
the tablet switch status changes.

On an ACPI based convertible chromebook check evtest display tablet mode
switch changes:
Available devices:
..
/dev/input/event3:      Tablet Mode Switch
..
Testing ... (interrupt to exit)
Event: time 1484879712.604360, type 5 (EV_SW), code 1 (SW_TABLET_MODE),
value 1
Event: time 1484879712.604360, -------------- SYN_REPORT ------------
Event: time 1484879715.132228, type 5 (EV_SW), code 1 (SW_TABLET_MODE),
value 0
Event: time 1484879715.132228, -------------- SYN_REPORT ------------
...
Check state is updated at resume time when different from suspend time.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
2018-05-23 11:56:45 -07:00