OSDN Git Service

STPK-1429 Limit firing rate for poll-mode sensors
authorPatrick Porlan <patrick.porlan@intel.com>
Wed, 7 May 2014 13:50:06 +0000 (15:50 +0200)
committersuyyala <sridhar.uyyala@intel.com>
Fri, 16 May 2014 18:14:54 +0000 (11:14 -0700)
commit5b1f6b7dc306efeb61b14cb06a8391e240e89369
tree41dc33e0e5b67a2a70ea77f1fa4f0f5ab27c167d
parent24f77427adeff371acf1495ce078af180aa1006a
STPK-1429 Limit firing rate for poll-mode sensors

Don't refresh values associated to poll-mode sensors, and don't
raise the flag that will cause an event to be propagated upwards,
until an amount of time consistent with the sensor sampling rate
has elapsed since an event was last reported in relation to this
sensor.

This takes care of scenarios such as a low refresh rate poll-mode
sensor and a high refresh rate device-driven sensor being both
enabled, and a lot of events (and sysfs reads) being generated
for the low refresh rate sensor without a good reason to do so.

Issue: STPK-1429

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