zephyr/dts/bindings/sensor/nuvoton,adc-cmp.yaml
Bernardo Perez Priego cfe4d51b4f drivers: sensor: Add adc-comparator binding and implementation for NPCX
Comparator will monitor signal though ADC channel, based on
user configuration, callback will be triggered.
This will enable comparator functionality for nuvoton MCU utilizing its
ADC threshold detection feature. Implementation is exported through
sensor trigger API. Use of CONFIG_ADC_CMP_NPCX is required.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-05-03 08:51:53 -05:00

30 lines
779 B
YAML

# Copyright (c) 2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
description: |
This will perform signal comparision with threshold established.
compatible: "nuvoton,adc-cmp"
properties:
io-channels:
type: phandle-array
required: true
description: |
ADC channel that will perform measurement.
threshold-mv:
type: int
required: false
description: |
Value in millivolts present on ADC data as threshold assert.
comparison:
type: string
required: false
description: |
Determines the condition to be met between ADC data and
threshold assert value that will trigger comparator event.
enum:
- ADC_CMP_NPCX_GREATER
- ADC_CMP_NPCX_LESS_OR_EQUAL