mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
454c219f5d
It may happen that the MPU6050 is the only hardware
trigger available on your system such as this:
> lsiio
Device 003: hscdtd008a
Device 001: mpu6050
Device 002: gp2ap002
Device 000: ab8500-gpadc
Trigger 000: mpu6050-dev1
And when you want to use it to read periodically from
your magnetometer like this:
> iio_generic_buffer -a -c 100 -n hscdtd008a -t mpu6050-dev1
Then the following happens:
[ 209.951334] Internal error: Oops: 5 [#1] SMP ARM
(...)
[ 209.981969] Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
[ 209.988925] PC is at inv_scan_query_mpu6050+0x8/0xb8
[ 209.993914] LR is at inv_mpu6050_set_enable+0x40/0x194
This is because since we are not using any channels from the
same device, the indio_dev->active_scan_mask is NULL.
Just checking for that and bailing out is however not enough:
we have to enable some kind of FIFO for the readout to work.
So enable the temperature as a dummy FIFO and all works
fine.
Not suitable for backporting to stable. It is an odd corner case
and does not represent a regression.
Fixes:
|
||
---|---|---|
.. | ||
inv_mpu_acpi.c | ||
inv_mpu_aux.c | ||
inv_mpu_aux.h | ||
inv_mpu_core.c | ||
inv_mpu_i2c.c | ||
inv_mpu_iio.h | ||
inv_mpu_magn.c | ||
inv_mpu_magn.h | ||
inv_mpu_ring.c | ||
inv_mpu_spi.c | ||
inv_mpu_trigger.c | ||
Kconfig | ||
Makefile |