linux/drivers/platform/chrome
Gwendal Grignou 7f4784f188 platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading
On some machines (nami), interrupt latency cause samples to appear
to be from the future and are pegged to the current time.
We would see samples with this pattern:

[t, t + ~5ms, t + ~10ms, t + ~10ms + 100us, t + ~10ms + 200us],
                             (current now)      (current now)
(t is the last timestamp time)

Last 2 samples would be barely spread, causing applications to
complain.

We now spread the entire sequence. This is not great: in the example
the sensor was supposed to send samples every 5ms, it now appears to
send one every 2.5ms, but it is slightly closer to reality:

sampling time in the example above
At sensor level

1             2             3             4            5
+-----5ms-----+-----5ms-----+-----5ms-----+----5ms-----+---> t

Before, at host level
                       1             2             3 4 5
--interrupt delay------+-----5ms-----+-----5ms-----+-+-+---> t

Afer, at host level
                       1       2       3       4       5
--interrupt delay------+-2.5ms-+-2.5ms-+-2.5ms-+-2.5ms-+---> t

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2020-07-31 11:52:43 +02:00
..
wilco_ec platform/chrome: wilco_ec: Provide correct output format to 'h1_gpio' file 2020-04-13 16:36:54 +02:00
chromeos_laptop.c platform/chrome: chromeos_laptop: make I2C API conversion complete 2020-03-27 18:25:32 +01:00
chromeos_pstore.c chrome platform changes for 5.8 2020-06-04 10:54:45 -07:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc: Report wake events 2019-09-12 16:01:35 +02:00
cros_ec_chardev.c platform/chrome: cros_ec_chardev: Replace zero-length array with flexible-array member 2020-03-22 11:15:18 +01:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: Control uptime information request 2020-06-19 19:16:18 +02:00
cros_ec_i2c.c platform/chrome: cros_ec_i2c: Appease the kernel-doc deity 2020-05-04 14:01:45 -07:00
cros_ec_ishtp.c platform/chrome: cros_ec_ishtp: Fix a double-unlock issue 2020-06-30 11:41:25 +02:00
cros_ec_lightbar.c platform/chrome: cros_ec_lightbar: Use cros_ec_cmd_xfer_status helper 2020-03-02 11:04:05 +01:00
cros_ec_lpc_mec.c platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line 2019-06-20 12:00:32 +02: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.c platform/chrome: cros_ec: Match implementation with headers 2020-02-03 17:14:50 +01:00
cros_ec_proto.c platform/chrome: cros_ec_proto: Do not export cros_ec_cmd_xfer() 2020-07-23 10:12:23 +02:00
cros_ec_rpmsg.c platform/chrome: cros_ec_rpmsg: Document missing struct parameters 2020-06-30 11:41:25 +02:00
cros_ec_sensorhub_ring.c platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading 2020-07-31 11:52:43 +02:00
cros_ec_sensorhub.c platform/chrome: cros_ec_sensorhub: Allocate sensorhub resource before claiming sensors 2020-04-29 23:17:45 +02:00
cros_ec_spi.c platform/chrome: cros_ec_spi: Document missing function parameters 2020-06-30 11:41:25 +02:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Use cros_ec_cmd_xfer_status helper 2020-03-02 11:04:05 +01:00
cros_ec_trace.c platform/chrome: cros_ec_proto: Add response tracing 2019-12-10 10:14:02 +01:00
cros_ec_trace.h platform/chrome: cros_ec_proto: Add response tracing 2019-12-10 10:14:02 +01:00
cros_ec_typec.c platform/chrome: cros_ec_typec: Unregister partner on error 2020-07-20 10:39:53 +02:00
cros_ec_vbc.c platform/chrome: cros_ec_vbc: Use cros_ec_cmd_xfer_status helper 2020-03-02 11:04:05 +01:00
cros_ec.c platform/chrome: cros_ec: Use cros_ec_cmd_xfer_status helper 2020-03-02 11:04:05 +01:00
cros_ec.h platform/chrome: cros_ec: Match implementation with headers 2020-02-03 17:14:50 +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: cros_usbpd_logger: Add __printf annotation to append_str() 2020-05-04 14:02:01 -07:00
cros_usbpd_notify.c platform/chrome: cros_usbpd_notify: Pull PD_HOST_EVENT status 2020-03-17 14:22:18 -07:00
Kconfig platform/chrome: cros_ec_typec: Add a dependency on USB_ROLE_SWITCH 2020-06-30 15:46:39 +02:00
Makefile platform/chrome: cros_ec_sensorhub: Add FIFO support 2020-03-28 22:04:32 +01:00