summaryrefslogtreecommitdiff
path: root/drivers/iio/light/cros_ec_light_prox.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2020-03-28 01:34:40 +0300
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2020-03-29 00:04:33 +0300
commit6562793b55c58b6b1dcb9cd581c7905afc25e89f (patch)
tree765ff79f3c35f65029f2794e4c1c670cfaac8c7b /drivers/iio/light/cros_ec_light_prox.c
parent2861be4ca9125ee1b7c49895948ca4236449a7fe (diff)
downloadlinux-6562793b55c58b6b1dcb9cd581c7905afc25e89f.tar.xz
iio: cros_ec: Expose hwfifo_timeout
Expose EC minimal interrupt period through buffer/hwfifo_timeout: - Maximal timeout is limited to 65s. - When timeout for all sensors is set to 0, EC will not send events, even if the sensor sampling rate is greater than 0. Rename frequency to sampling_frequency to match IIO ABI. 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 'drivers/iio/light/cros_ec_light_prox.c')
-rw-r--r--drivers/iio/light/cros_ec_light_prox.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/light/cros_ec_light_prox.c b/drivers/iio/light/cros_ec_light_prox.c
index e10b35de4c2f..2198b50909ed 100644
--- a/drivers/iio/light/cros_ec_light_prox.c
+++ b/drivers/iio/light/cros_ec_light_prox.c
@@ -183,6 +183,8 @@ static int cros_ec_light_prox_probe(struct platform_device *pdev)
if (ret)
return ret;
+ iio_buffer_set_attrs(indio_dev->buffer, cros_ec_sensor_fifo_attributes);
+
indio_dev->info = &cros_ec_light_prox_info;
state = iio_priv(indio_dev);
state->core.type = state->core.resp->info.type;
@@ -191,8 +193,7 @@ static int cros_ec_light_prox_probe(struct platform_device *pdev)
/* Common part */
channel->info_mask_shared_by_all =
- BIT(IIO_CHAN_INFO_SAMP_FREQ) |
- BIT(IIO_CHAN_INFO_FREQUENCY);
+ BIT(IIO_CHAN_INFO_SAMP_FREQ);
channel->info_mask_shared_by_all_available =
BIT(IIO_CHAN_INFO_SAMP_FREQ);
channel->scan_type.realbits = CROS_EC_SENSOR_BITS;