it83xx/adc: ADC read is successful if valid bit is set
it83xx/adc: ADC read is successful if valid bit is set

In task_wait_event_mask(), if task woke up by an event which isn't
what we want (events |= __wait_evt(time_remaining_us, TASK_ID_IDLE)),
and timeout occurs (time_remaining_us = deadline - get_time().val).
EC will post timeout event to task even if the event we want
((eg.TASK_EVENT_ADC_DONE)) has been set.

We fix this symptom with checking data valid bit of ADC's register.
So we won't miss ADC read.

BUG=b:171731189
BRANCH=none
TEST=No ADC read error on RunInStressCountdown

Signed-off-by: Dino Li <338d523ecf3700bd86eb9c34d220f91911d2a18c@ite.com.tw>
Change-Id: I56b301a0f58b64833ae17e2b6e789c879e48cc5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2501091
Reviewed-by: Jett Rink <9d4aef0593e6843318d99df31597fb6153b89787@chromium.org>
Reviewed-by: Diana Z <cb2016afc7183e5356c690dc63b4ba817470501a@chromium.org>
Reviewed-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec