summaryrefslogtreecommitdiff
path: root/board/atlas/battery.c
diff options
context:
space:
mode:
authorAlexandru M Stan <amstan@chromium.org>2018-05-17 16:29:06 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-30 01:02:37 -0700
commitb317d2d65dafc48634087485c0671bbc2e47ebb3 (patch)
tree90c3b4b68126e32d34e108d291098c63dc610037 /board/atlas/battery.c
parent7e7d0be726c2009fdf3755c7998df171a8437e60 (diff)
downloadchrome-ec-b317d2d65dafc48634087485c0671bbc2e47ebb3.tar.gz
sensors: Make sync driver more robust
Use a queue now for sync events, this will allow multiple interrupts to be called before the motion sense task executes. The events (including timestamps) get stored in a small queue. 8 events for the queue size should be plenty, most applications will have latency concerns anyway once we get a couple of queued up events. Also changed the init function to be a little bit more robust to race conditions. Added count argument to the "sync" simulation command to test the queue behavior. BRANCH=master BUG=b:73551961, b:67743747 TEST="sync 4" yields 4 events on the AP, whereas before it would only give the AP the last event. Change-Id: I9fcb1fb8b35eb5f8ffcc21afbfcb0f0d9bc33804 Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1065149 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'board/atlas/battery.c')
0 files changed, 0 insertions, 0 deletions