iio:inv-mpu6050: Fix inconsistency for the scale channel
authorAdriana Reus <adriana.reus@intel.com>
Mon, 23 Feb 2015 14:40:51 +0000 (16:40 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 14 Mar 2015 18:36:21 +0000 (18:36 +0000)
commitaf5e1a68318e2ed2de22fc2d7a02f2882abe073c
treec6eed53b7effa38d80bf0c6e68fec13d999fc427
parented170dedd1ddd316c5cd17fec3dd7937981e2fb7
iio:inv-mpu6050: Fix inconsistency for the scale channel

Fix inconsistency in the semantics of the scale attribute.
For scale the write_raw function was considering the scale table index
and writing the appropriate value into the range register, while
for read_raw it was outputting the actual scale.
Fix this behaviour and adhere to the iio ABI specification.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Viorel Suman <viorel.suman@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c