diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-01-29 23:19:43 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-05 08:28:42 +0000 |
commit | 5d4a91818b08cee77fef812ea5acf9d31e110f27 (patch) | |
tree | 5bd92408f2385c456b83085560f9a969446cca3b /board/twinkie/ec.tasklist | |
parent | c7313be9af31a4a2cd833b2e2440404aab52c04e (diff) | |
download | chrome-ec-5d4a91818b08cee77fef812ea5acf9d31e110f27.tar.gz |
npcx: Add support for ADC threshold interrupts
The Nuvoton NPCX EC series support a threshold event detector for the
ADC channels. There are three threshold event detectors and they can be
mapped to any ADC channel. The block compares the measured voltage
input to either a programmable threshold or a pair of thresholds and
generates an interrupt if the measured voltage is above or below the
thresholds.
This commit adds support for this feature. A new structure is created,
npcx_adc_thresh_t which allows a board to define the ADC channel that
should be monitored, the assertion and deassertion thresholds, a
callback that can be run when the interrupt fires and a flag for
whether or not the interrupt should fire if the measured value is above
or below the threshold.
BUG=b:148169171
BRANCH=None
TEST=Enable on waddledoo, verify that the ADC dual threshold interrupt
functionality works.
Change-Id: I5a3e517207a71b1298865fe36b80cc6298567e9e
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2030204
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/twinkie/ec.tasklist')
0 files changed, 0 insertions, 0 deletions