diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-11-19 13:45:46 +0100 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2019-11-21 11:23:14 +0100 |
commit | 05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1 (patch) | |
tree | 759954afc73e37fecba299388f1d6be0909a529e /drivers/platform/chrome/cros_ec_lpc.c | |
parent | d60ac88a62df71cb12b2d60d2dae5658fb4eab43 (diff) | |
download | linux-stable-05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1.tar.gz linux-stable-05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1.tar.bz2 linux-stable-05a3c420eaa6857cb20afe7e3a3c39ed94a3b2c1.zip |
platform/chrome: cros-ec: Record event timestamp in the hard irq
To improve sensor timestamp precision, given EC and AP are in different
time domains, the AP needs to try to record the exact moment an event
was signalled to the AP by the EC as soon as possible after it happens.
First thing in the hard irq is the best place for this.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'drivers/platform/chrome/cros_ec_lpc.c')
-rw-r--r-- | drivers/platform/chrome/cros_ec_lpc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c index 7d10d909435f..3c77496e164d 100644 --- a/drivers/platform/chrome/cros_ec_lpc.c +++ b/drivers/platform/chrome/cros_ec_lpc.c @@ -313,6 +313,8 @@ static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data) { struct cros_ec_device *ec_dev = data; + ec_dev->last_event_time = cros_ec_get_time_ns(); + if (ec_dev->mkbp_event_supported && cros_ec_get_next_event(ec_dev, NULL) > 0) blocking_notifier_call_chain(&ec_dev->event_notifier, 0, |