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: ae7b02ad2f ("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>
This commit is contained in:
Gwendal Grignou
2020-03-27 15:34:42 -07:00
committed by Enric Balletbo i Serra
parent cb87556068
commit 317a0ebe53
2 changed files with 22 additions and 16 deletions

View File

@@ -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,