OSDN Git Service

STPK-1429 Enable known channels once at boot time
authorPatrick Porlan <patrick.porlan@intel.com>
Wed, 28 May 2014 08:29:44 +0000 (10:29 +0200)
committersuyyala <sridhar.uyyala@intel.com>
Sat, 7 Jun 2014 16:37:04 +0000 (09:37 -0700)
commitd93e8b62cf3b44fd0d3b16093dd87bd44f8dd370
treee57f6079a5d1f9550a90d4e6d597536cf06d4c38
parent65c479844c81f4a991a413980f6f71bd8ccf1bc9
STPK-1429 Enable known channels once at boot time

That solves the problem with gyro not working on T100 if the
accelerometer hasn't been enabled. We have a combination of
two factors at play: data for disabled channels is not
reported through the character device, but it also seems that
once a channel has been enabled, we can't disable it anymore.

As sampling is not active before a trigger is selected and
the buffer is enabled (with an additional open on the iio
character device being necessary for this data to be read)
that should not do any harm.

If we could reliably disable channels then we could go back
to dynamic maps updated when a sensor gets enabled or disabled,
but this comes with additional complexity such as synchronization
between reads and enable/disable operations... better have a
static structure for iio device reports.

Issue: STPK-1429

Change-Id: Ic3b5a0e6e39c09e9533b35b1f6dac279a41b96a5
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
control.c