]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iio: bmi160: Fix ODR setting
authorDaniel Baluta <daniel.baluta@intel.com>
Fri, 29 Apr 2016 11:42:34 +0000 (14:42 +0300)
committerJonathan Cameron <jic23@kernel.org>
Wed, 4 May 2016 09:50:36 +0000 (10:50 +0100)
mask and val parameters of regmap_update_bits were reveresed.

Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/bmi160/bmi160_core.c

index cd9b75eeccd7c938d0564228a6c635ceab545d93..b8a290ec984e33f79aaa8b546f543709e579b7b3 100644 (file)
@@ -364,8 +364,8 @@ int bmi160_set_odr(struct bmi160_data *data, enum bmi160_sensor_type t,
 
        return regmap_update_bits(data->regmap,
                                  bmi160_regs[t].config,
-                                 bmi160_odr_table[t].tbl[i].bits,
-                                 bmi160_regs[t].config_odr_mask);
+                                 bmi160_regs[t].config_odr_mask,
+                                 bmi160_odr_table[t].tbl[i].bits);
 }
 
 static int bmi160_get_odr(struct bmi160_data *data, enum bmi160_sensor_type t,