diff options
author | Daniel Baluta <daniel.baluta@intel.com> | 2014-11-10 10:20:16 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-11-15 16:11:28 +0000 |
commit | e90dea6aafa14eb60ab0927f6fe54c620f61ef74 (patch) | |
tree | e05c5c7e75f87afd5469a996d38a9501a005af0e /net/rxrpc | |
parent | ccf54555da9a5e91e454b909ca6a5303c7d6b910 (diff) |
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: a735e3d7f03 (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>
Diffstat (limited to 'net/rxrpc')
0 files changed, 0 insertions, 0 deletions