diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-03-27 23:34:42 +0100 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-03-30 08:24:49 +0200 |
commit | 317a0ebe53f46527aed912f7c3df963cd9a41536 (patch) | |
tree | fb7c2dfddb967eb5192dc597e08cb911451e0868 /include | |
parent | iio: cros_ec: Report hwfifo_watermark_max (diff) | |
download | linux-317a0ebe53f46527aed912f7c3df963cd9a41536.tar.xz linux-317a0ebe53f46527aed912f7c3df963cd9a41536.zip |
iio: cros_ec: Use Hertz as unit for sampling frequency
To be compliant with other sensors, set and get sensor sampling
frequency in Hz, not mHz.
Fixes: ae7b02ad2f32 ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/iio/common/cros_ec_sensors_core.h b/include/linux/iio/common/cros_ec_sensors_core.h index bc26ae2e3272..7bc961defa87 100644 --- a/include/linux/iio/common/cros_ec_sensors_core.h +++ b/include/linux/iio/common/cros_ec_sensors_core.h @@ -51,6 +51,8 @@ typedef irqreturn_t (*cros_ec_sensors_capture_t)(int irq, void *p); * 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 + * @frequencies: Table of known available frequencies: + * 0, Min and Max in mHz */ struct cros_ec_sensors_core_state { struct cros_ec_device *ec; @@ -74,9 +76,7 @@ struct cros_ec_sensors_core_state { 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]; + int frequencies[6]; }; int cros_ec_sensors_read_lpc(struct iio_dev *indio_dev, unsigned long scan_mask, |