OSDN Git Service

Determine maxRange and resolution from IIO attributes
authorAdriana Reus <adriana.reus@intel.com>
Tue, 21 Jul 2015 10:19:20 +0000 (13:19 +0300)
committerbuildslave <sys_buildbot@intel.com>
Wed, 22 Jul 2015 13:10:44 +0000 (13:10 +0000)
commit62a0d46b4bd6a37b9e2c2340c1e3c744076dac8b
tree38c8590593dd0a1abd23e9ef29886bbb701a1281
parent77c428093ef5a6bd6d97b8e49ca4416151ec8298
Determine maxRange and resolution from IIO attributes

This patch determines the Android maxRange and resolution sensor
attributes based on the IIO attributes:

resolution = scale (or 1 if no scale is defined)

maxRange = 2^realbits * resolution + offset

If scale or offset are not defined at the sensor level we pick them
from the first channel.

This should avoid the need to define Android properties in most
cases. However, one can still use Android properties to override the
automatically computed values.

Change-Id: I04536be1fe741d887103ab07fda7daf4b4408ddc
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-14246
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-on: https://android.intel.com:443/392075
control.c
description.c
description.h
transform.c
transform.h