diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-03-27 23:34:41 +0100 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-03-28 22:04:33 +0100 |
commit | cb87556068146de5c9933397706d3bde88b4a14d (patch) | |
tree | dd5251da13bcfb9a33168d10f2210b5a761cbe0e /include | |
parent | iio: cros_ec: Expose hwfifo_timeout (diff) | |
download | linux-cb87556068146de5c9933397706d3bde88b4a14d.tar.xz linux-cb87556068146de5c9933397706d3bde88b4a14d.zip |
iio: cros_ec: Report hwfifo_watermark_max
Report the maximum amount of sample the EC can hold.
This is not tunable, but can be useful for application to find out the
maximum amount of time it can sleep when hwfifo_timeout is set to a
large number.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/iio/common/cros_ec_sensors_core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/common/cros_ec_sensors_core.h b/include/linux/iio/common/cros_ec_sensors_core.h index 5b0acc14c891..bc26ae2e3272 100644 --- a/include/linux/iio/common/cros_ec_sensors_core.h +++ b/include/linux/iio/common/cros_ec_sensors_core.h @@ -50,6 +50,7 @@ typedef irqreturn_t (*cros_ec_sensors_capture_t)(int irq, void *p); * the timestamp. The timestamp is always last and * is always 8-byte aligned. * @read_ec_sensors_data: function used for accessing sensors values + * @fifo_max_event_count: Size of the EC sensor FIFO */ struct cros_ec_sensors_core_state { struct cros_ec_device *ec; @@ -72,6 +73,8 @@ struct cros_ec_sensors_core_state { int (*read_ec_sensors_data)(struct iio_dev *indio_dev, unsigned long scan_mask, s16 *data); + u32 fifo_max_event_count; + /* Table of known available frequencies : 0, Min and Max in mHz */ int frequencies[3]; }; |