Overflow happens when raw value from ADC is greater than 0x7FFF.
When it happens, skip the result.
BRANCH=ryu,jerry
TEST=Without this code, the proximity sensor would show 22000in
instead of staying close to 0 when thumb is near sensor.
BUG=chrome-os-partner:53851
Change-Id: Id2182acbbf7b00157d9fee5d28bb61df4f166246
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/348300