android_kernel_oneplus_msm8998/drivers/iio
Irina Tirdea 51789682df iio: gyro: bmg160: fix endianness when reading axes
commit 95e7ff034175db7d8aefabe7716c4d42bea24fde upstream.

For big endian platforms, reading the axes will return
invalid values.

The device stores each axis value in a 16 bit little
endian register. The driver uses regmap_read_bulk to get
the axis value, resulting in a 16 bit little endian value.
This needs to be converted to cpu endianness to work
on big endian platforms.

Fix endianness for big endian platforms by converting
the values for the axes read from little endian to
cpu.

This is also partially fixed in commit 82d8e5da1a33 ("iio:
accel: bmg160: optimize transfers in trigger handler").

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-20 15:42:12 +09:00
..
accel iio: accel: bmc150: fix endianness when reading axes 2016-04-20 15:42:12 +09:00
adc iio: add HAS_IOMEM dependency to VF610_ADC 2016-02-25 12:01:17 -08:00
amplifiers spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
buffer
chemical iio: chemical: vz89x hardware i2c workaround 2015-09-30 18:20:53 +01:00
common spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
dac iio: dac: mcp4725: set iio name property in sysfs 2016-02-25 12:01:17 -08:00
frequency spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
gyro iio: gyro: bmg160: fix endianness when reading axes 2016-04-20 15:42:12 +09:00
humidity First set of IIO fixes for the 4.4 cycle. 2015-11-18 13:15:50 -08:00
imu iio: adis_buffer: Fix out-of-bounds memory access 2016-02-25 12:01:17 -08:00
light iio: light: acpi-als: Report data as processed 2016-02-25 12:01:17 -08:00
magnetometer iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE 2016-04-20 15:42:11 +09:00
orientation
potentiometer iio: mcp4531: Driver for Microchip digital potentiometers 2015-09-30 18:20:53 +01:00
pressure iio: pressure: mpl115: fix temperature offset sign 2016-02-25 12:01:17 -08:00
proximity iio: lidar: return -EINVAL on invalid signal 2015-11-21 15:56:53 +00:00
temperature Add tsys02d meas-spec driver support 2015-10-11 10:21:19 +01:00
trigger
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: fix some warning messages 2015-11-21 16:00:05 +00:00
industrialio-core.c iio: fix some warning messages 2015-11-21 16:00:05 +00:00
industrialio-event.c
industrialio-trigger.c iio: Support triggered events 2015-08-27 20:47:09 +01:00
industrialio-triggered-event.c iio: Support triggered events 2015-08-27 20:47:09 +01:00
inkern.c iio: inkern: fix a NULL dereference on error 2016-02-25 12:01:17 -08:00
Kconfig iio: mcp4531: Driver for Microchip digital potentiometers 2015-09-30 18:20:53 +01:00
Makefile iio: mcp4531: Driver for Microchip digital potentiometers 2015-09-30 18:20:53 +01:00