linux/drivers/platform/chrome
Nick Crews f7b0bc5eaf platform/chrome: wilco_ec: Add event handling
The Wilco Embedded Controller can create custom events that
are not handled as standard ACPI objects. These events can
contain information about changes in EC controlled features,
such as errors and events in the dock or display. For example,
an event is triggered if the dock is plugged into a display
incorrectly. These events are needed for telemetry and
diagnostics reasons, and for possibly alerting the user.

These events are triggered by the EC with an ACPI Notify(0x90),
and then the BIOS reads the event buffer from EC RAM via an
ACPI method. When the OS receives these events via ACPI,
it passes them along to this driver. The events are put into
a queue which can be read by a userspace daemon via a char device
that implements read() and poll(). The event queue acts as a
circular buffer of size 64, so if there are no userspace consumers
the kernel will not run out of memory. The char device will appear at
/dev/wilco_event{n}, where n is some small non-negative integer,
starting from 0. Standard ACPI events such as the battery getting
plugged/unplugged can also come through this path, but they are
dealt with via other paths, and are ignored here.

To test, you can tail the binary data with
$ cat /dev/wilco_event0 | hexdump -ve '1/1 "%x\n"'
and then create an event by plugging/unplugging the battery.

Signed-off-by: Nick Crews <ncrews@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-06-03 18:51:14 +02:00
..
wilco_ec platform/chrome: wilco_ec: Add event handling 2019-06-03 18:51:14 +02:00
chromeos_laptop.c platform/chrome: chromeos_laptop: use pci_dev_id() helper 2019-04-29 16:13:06 -05:00
chromeos_pstore.c platform/chrome: cromeos_pstore: switch to SPDX identifier 2019-02-01 10:13:05 +01:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc - Remove unneeded const 2018-10-09 22:40:12 -07:00
cros_ec_debugfs.c chrome platform changes for v5.2 2019-05-12 07:00:21 -04:00
cros_ec_i2c.c platform/chrome: cros_ec_i2c: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
cros_ec_ishtp.c platform/chrome: Add ChromeOS EC ISHTP driver 2019-05-20 10:18:10 +02:00
cros_ec_lightbar.c platform/chrome: cros_ec_lightbar: remove pr_fmt() define 2019-02-01 10:13:06 +01:00
cros_ec_lpc_mec.c platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec 2019-02-11 10:07:40 +01:00
cros_ec_lpc_mec.h platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec 2019-02-11 10:07:40 +01:00
cros_ec_lpc_reg.c platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec 2019-02-11 10:07:40 +01:00
cros_ec_lpc_reg.h platform/chrome: cros_ec_lpc: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
cros_ec_lpc.c platform/chrome: cros_ec_lpc: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
cros_ec_proto.c - Core Frameworks 2019-05-14 10:39:08 -07:00
cros_ec_rpmsg.c platform/chrome: cros_ec: Add EC host command support using rpmsg 2019-04-16 11:00:36 +02:00
cros_ec_spi.c platform/chrome: cros_ec_spi: Request the SPI thread be realtime 2019-05-24 11:35:30 +02:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: remove pr_fmt() define 2019-02-01 10:13:06 +01:00
cros_ec_trace.c platform/chrome: cros_ec_proto: Add trace event to trace EC commands 2019-04-17 10:29:34 +02:00
cros_ec_trace.h platform/chrome: cros_ec_proto: Add trace event to trace EC commands 2019-04-17 10:29:34 +02:00
cros_ec_vbc.c platform/chrome: cros_ec_vbc: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
cros_kbd_led_backlight.c platform/chrome: cros_kbd_led_backlight: switch to SPDX identifier 2019-02-01 10:13:06 +01:00
cros_usbpd_logger.c platform/chrome: Add CrOS USB PD logging driver 2019-04-15 12:13:24 +02:00
Kconfig platform/chrome: Add ChromeOS EC ISHTP driver 2019-05-20 10:18:10 +02:00
Makefile platform/chrome: Add ChromeOS EC ISHTP driver 2019-05-20 10:18:10 +02:00