Files
charge-controller-firmware/zephyr/dts/bindings/adc-inputs.yaml
T

48 lines
1.2 KiB
YAML

# Copyright (c) The Libre Solar Project Contributors
# SPDX-License-Identifier: Apache-2.0
description: Description for an ADC input including gain (multiplier/divider) and offset
compatible: "adc-inputs"
child-binding:
description: ADC inputs child node
properties:
io-channels:
type: phandle-array
required: true
description: |
ADC channel for this input.
multiplier:
type: int
required: true
description: |
Resistance of the lower leg of the voltage divider.
divider:
type: int
required: true
description: |
Resistance of the full path through the voltage divider.
offset:
type: int
required: false
description: |
Offset to be substracted from ADC raw reading before applying the gain
filter-const:
type: int
default: 5
description: Low-pass filter multiplier 1/(2^filter-const)
enable-gpios:
type: phandle-array
required: false
description: |
Enable the voltage divider input or amplifier.
If present the corresponding GPIO must be set to an active level
to enable the divider input.