linux/drivers/iio/accel
Irina Tirdea 82bd14ade9 iio: accel: bmc150: fix endianness when reading axes
commit 2215f31dc6 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 b6fb9b6d6552 ("iio:
accel: bmc150: 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>
History 2016-04-20 15:42:12 +09:00
..
bma180.c iio: Drop owner assignment from i2c_driver 2015-07-11 18:50:07 +01:00
bmc150-accel-core.c iio: accel: bmc150: fix endianness when reading axes 2016-04-20 15:42:12 +09:00
bmc150-accel-i2c.c iio: bmc150: Split the driver into core and i2c 2015-10-03 12:06:21 +01:00
bmc150-accel-spi.c iio: bmc150: Add SPI driver 2015-10-03 12:06:38 +01:00
bmc150-accel.h iio: bmc150: Split the driver into core and i2c 2015-10-03 12:06:21 +01:00
hid-sensor-accel-3d.c iio: accel: hid-sensor-accel-3d: Fix memory leak in probe() 2015-05-17 09:09:05 +01:00
Kconfig iio: add IIO_TRIGGER dependency to STK8BA50 2016-02-25 12:01:17 -08:00
kxcjk-1013.c iio: remove gpio interrupt probing from drivers that use a single interrupt 2015-10-03 12:05:51 +01:00
kxsd9.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
Makefile iio: bmc150: Add SPI driver 2015-10-03 12:06:38 +01:00
mma8452.c iio: mma8452: leave sysfs namings to the iio core 2015-09-23 20:23:23 +01:00
mma9551.c iio: accel: mma9551: Check gpiod_to_irq return value 2015-03-09 13:27:49 +00:00
mma9551_core.c iio: accel: mma9553: fix alignment issues 2015-06-14 16:00:54 +01:00
mma9551_core.h iio: accel: mma9553: fix alignment issues 2015-06-14 16:00:54 +01:00
mma9553.c iio: remove gpio interrupt probing from drivers that use a single interrupt 2015-10-03 12:05:51 +01:00
mxc4005.c iio: mxc4005: add data ready trigger for mxc4005 2015-08-31 17:58:49 +01:00
ssp_accel_sensor.c iio: common: ssp_sensors: Add sensorhub accelerometer sensor 2015-01-29 18:49:56 +00:00
st_accel.h iio: st-accel: add support for lsm303agr accelerometer 2015-07-23 20:43:22 +01:00
st_accel_buffer.c iio:st_accel: Drop redundant call to iio_sw_buffer_preenable() 2013-10-16 19:11:11 +01:00
st_accel_core.c Merge 4.3-rc7 into staging-next 2015-10-27 09:13:38 +09:00
st_accel_i2c.c iio: st-accel: add support for lsm303agr accelerometer 2015-07-23 20:43:22 +01:00
st_accel_spi.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
stk8ba50.c iio: remove gpio interrupt probing from drivers that use a single interrupt 2015-10-03 12:05:51 +01:00
stk8312.c iio: remove gpio interrupt probing from drivers that use a single interrupt 2015-10-03 12:05:51 +01:00