linux-stable/drivers/iio/accel
Daniel Baluta e90dea6aaf iio: accel: kxcjk-1013: Fix kxcjk10013_set_range
Currently, we get the new GSEL bits by OR-ing the old values
with the new ones. This only works first time when the old
values are 0.

Startup:
	* GSEL0 = 0, GSEL1 = 0

Set range to 4G: (GSEL0 = 1, GSEL1 = 0)
	* GSEL0 = 0 | 1 = 1
	* GSEL1 = 0 | 0 = 0
	* correct

Change range to 2G: (GSEL0 = 0, GSEL1 = 0)
	* GSEL0 = 1 | 0 = 1
	* GSEL1 = 0 | 0 = 0
	* wrong, GSEL0 should be 0

This has the nice effect that we can use the full scale range,
exported in in_accel_scale_available.

Fixes: a735e3d7f0 (iio: accel: kxcjk-1013: Set adjustable range)
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-11-15 16:11:28 +00:00
..
bma180.c staging: iio: fix up merge error 2014-09-22 07:54:10 -07:00
bmc150-accel.c iio: accel: BMC150: add support for other Bosch chips 2014-09-13 21:35:46 +01:00
hid-sensor-accel-3d.c iio: remove .owner field for driver using module_platform_driver 2014-08-26 21:08:38 +01:00
Kconfig iio:bma180: Add BMA250 chip support 2014-09-14 20:52:25 +01:00
kxcjk-1013.c iio: accel: kxcjk-1013: Fix kxcjk10013_set_range 2014-11-15 16:11:28 +00:00
kxsd9.c iio:accel:kxsd9 fix missing mutex unlock 2013-11-17 15:22:00 +00:00
Makefile iio: accel: BMC150 accel support 2014-08-07 11:43:49 +01:00
mma8452.c Staging driver patches for 3.17-rc1 2014-08-04 18:36:12 -07:00
st_accel.h iio: Added ST-sensors platform data to select the DRDY interrupt pin 2013-08-03 18:40:28 +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 iio:st sensors: remove custom sampling frequence attribute in favour of core support. 2014-07-07 09:39:57 +01:00
st_accel_i2c.c iio: st_sensors: add devicetree probing support 2014-07-11 21:09:49 +01:00
st_accel_spi.c iio: accel: st_accel: Use devm_iio_device_alloc 2013-08-03 18:41:18 +01:00