iio: light sensor: Improve granularity of tsl2583 lux values.
authorBryan Freed <bfreed@chromium.org>
Fri, 2 Dec 2011 22:19:30 +0000 (14:19 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Dec 2011 19:30:24 +0000 (11:30 -0800)
commit014fcb1db5d8fd1dde1e3b777389edcd8d85a2e2
treee010e88a74ef182219505a0fedfd38eeb50e2638
parentd666c0d490d85d35fe6d6d45ba029cf16046dc82
iio: light sensor: Improve granularity of tsl2583 lux values.

When illuminance0_calibbias gets 4000 (for a 4x multiplier), we see lux
granularity of 4.  Reversing the order of the right shift and multiplication
retains the precision of the unadjusted lux value.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/light/tsl2583.c