drivers: adc: voltage divider
adds DT macro initializer and scaling function for voltage divider. Signed-off-by: Jason Yuan <jasonyuan@google.com>
This commit is contained in:
parent
f7c1f91148
commit
67bdd17808
2 changed files with 59 additions and 0 deletions
|
@ -1,38 +0,0 @@
|
|||
# Copyright (c) 2019, Peter Bigot Consulting, LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: |
|
||||
Description for a voltage divider, with optional ability to measure
|
||||
resistance of the upper leg.
|
||||
|
||||
compatible: "voltage-divider"
|
||||
|
||||
include: base.yaml
|
||||
|
||||
properties:
|
||||
io-channels:
|
||||
required: true
|
||||
description: |
|
||||
Channels available with this divider configuration.
|
||||
|
||||
output-ohms:
|
||||
type: int
|
||||
required: true
|
||||
description: |
|
||||
Resistance of the lower leg of the voltage divider
|
||||
|
||||
full-ohms:
|
||||
type: int
|
||||
description: |
|
||||
Resistance of the full path through the voltage divider.
|
||||
|
||||
If absent or zero the driver assumes that the upper leg is a
|
||||
resistance-based sensor.
|
||||
|
||||
power-gpios:
|
||||
type: phandle-array
|
||||
description: |
|
||||
Control power to the voltage divider inputs.
|
||||
|
||||
If present the corresponding GPIO must be set to an active level
|
||||
to enable the divider input.
|
Loading…
Add table
Add a link
Reference in a new issue