OSDN Git Service

iio_sensors: Remove hard coded exponent and data bytes
authorArchana Patni <archana.patni@linux.intel.com>
Fri, 30 May 2014 15:29:42 +0000 (11:29 -0400)
committersuyyala <sridhar.uyyala@intel.com>
Sat, 7 Jun 2014 16:37:21 +0000 (09:37 -0700)
commit2c628fed5261c44e510239b3616ada8d91650c8d
tree9b0615be24a46beef26ce6ed7b219d444b8b24ce
parent54d334999a128b7fdab7fc6c47362b7adf116155
iio_sensors: Remove hard coded exponent and data bytes

The current implementation used hard coded exponent and
data bytes for the data transformation macros inside
transform_sample_ISH function. These values were not
correct for all implementations and were resulting in
large invalid values.

These can be calculated from the SysFs attributes exported
by the driver. This patch changes the calculation to use these
and was tested on BDW Wilson Beach (running Intel FW) and
BDW RVP Y (running STM FW).

Change-Id: Ie66ee5a5b9692cee3a48d4027f795b16c6b5e8d0
Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Subramony Sesha <subramony.sesha@intel.com>
transform.c