iio: cros_ec: Set Gyroscope default frequency to 25Hz
commit5.4-rM2-2.2.x-imx-squashed336306790b
upstream. BMI160 Minimium gyroscope frequency in normal mode is 25Hz. When older EC firmware do not report their sensors frequencies, use 25Hz as the minimum for gyroscope to be sure it works on BMI160. Fixes:ae7b02ad2f
("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> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
c71e70a85b
commit
c80210735f
|
@ -57,10 +57,13 @@ static void get_default_min_max_freq(enum motionsensor_type type,
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case MOTIONSENSE_TYPE_ACCEL:
|
case MOTIONSENSE_TYPE_ACCEL:
|
||||||
case MOTIONSENSE_TYPE_GYRO:
|
|
||||||
*min_freq = 12500;
|
*min_freq = 12500;
|
||||||
*max_freq = 100000;
|
*max_freq = 100000;
|
||||||
break;
|
break;
|
||||||
|
case MOTIONSENSE_TYPE_GYRO:
|
||||||
|
*min_freq = 25000;
|
||||||
|
*max_freq = 100000;
|
||||||
|
break;
|
||||||
case MOTIONSENSE_TYPE_MAG:
|
case MOTIONSENSE_TYPE_MAG:
|
||||||
*min_freq = 5000;
|
*min_freq = 5000;
|
||||||
*max_freq = 25000;
|
*max_freq = 25000;
|
||||||
|
|
Loading…
Reference in New Issue