2019-02-09 08:37:17 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
2019-11-07 00:33:19 +08:00
|
|
|
wilco_ec-objs := core.o keyboard_leds.o mailbox.o \
|
|
|
|
properties.o sysfs.o
|
2019-02-09 08:37:17 +08:00
|
|
|
obj-$(CONFIG_WILCO_EC) += wilco_ec.o
|
2019-02-09 08:37:18 +08:00
|
|
|
wilco_ec_debugfs-objs := debugfs.o
|
|
|
|
obj-$(CONFIG_WILCO_EC_DEBUGFS) += wilco_ec_debugfs.o
|
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-05-24 07:06:24 +08:00
|
|
|
wilco_ec_events-objs := event.o
|
|
|
|
obj-$(CONFIG_WILCO_EC_EVENTS) += wilco_ec_events.o
|
2019-05-22 03:20:45 +08:00
|
|
|
wilco_ec_telem-objs := telemetry.o
|
|
|
|
obj-$(CONFIG_WILCO_EC_TELEMETRY) += wilco_ec_telem.o
|