diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-06-30 18:37:30 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-11-01 18:22:45 +0300 |
commit | 56e4f2dda23c6d39d327944faa89efaa4eb290d1 (patch) | |
tree | e6f1a0feaf80eb2489aef5aa18b6fe6bf76c9ade /lib/test_overflow.c | |
parent | 7e97e4cbf30026b49b0145c3bfe06087958382c5 (diff) | |
download | linux-56e4f2dda23c6d39d327944faa89efaa4eb290d1.tar.xz |
iio: cros_ec: Use default frequencies when EC returns invalid information
Minimal and maximal frequencies supported by a sensor is queried.
On some older machines, these frequencies are not returned properly and
the EC returns 0 instead.
When returned maximal frequency is 0, ignore the information and use
default frequencies instead.
Fixes: ae7b02ad2f32 ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200630153730.3302889-1-gwendal@chromium.org
CC: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions