Merge 4.8-rc6 into staging-next
We need the IIO changes in here for future patches to build on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -67,6 +67,9 @@
|
||||
#define BMC150_ACCEL_REG_PMU_BW 0x10
|
||||
#define BMC150_ACCEL_DEF_BW 125
|
||||
|
||||
#define BMC150_ACCEL_REG_RESET 0x14
|
||||
#define BMC150_ACCEL_RESET_VAL 0xB6
|
||||
|
||||
#define BMC150_ACCEL_REG_INT_MAP_0 0x19
|
||||
#define BMC150_ACCEL_INT_MAP_0_BIT_SLOPE BIT(2)
|
||||
|
||||
@@ -1497,6 +1500,14 @@ static int bmc150_accel_chip_init(struct bmc150_accel_data *data)
|
||||
int ret, i;
|
||||
unsigned int val;
|
||||
|
||||
/*
|
||||
* Reset chip to get it in a known good state. A delay of 1.8ms after
|
||||
* reset is required according to the data sheets of supported chips.
|
||||
*/
|
||||
regmap_write(data->regmap, BMC150_ACCEL_REG_RESET,
|
||||
BMC150_ACCEL_RESET_VAL);
|
||||
usleep_range(1800, 2500);
|
||||
|
||||
ret = regmap_read(data->regmap, BMC150_ACCEL_REG_CHIP_ID, &val);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Error: Reading chip id\n");
|
||||
|
@@ -166,6 +166,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
|
||||
ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
|
||||
if (ret < 0)
|
||||
goto error_ret;
|
||||
*val = 0;
|
||||
*val2 = kxsd9_micro_scales[ret & KXSD9_FS_MASK];
|
||||
ret = IIO_VAL_INT_PLUS_MICRO;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user