Analog Devices LTC2947 high precision power and energy monitor
Schema identifier ($id): "http://devicetree.org/schemas/hwmon/adi,ltc2947.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Nuno Sá <nuno.sa@analog.com>"
Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C.
https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "adi,ltc2947"
reg — required here #
Maximum number of items (maxItems): 1
clocks — not listed as required here #
The LTC2947 uses either a trimmed internal oscillator or an external clock as the time base for determining the integration period to represent time, charge and energy. When an external clock is used, this property must be set accordingly.
Maximum number of items (maxItems): 1
adi,accumulator-ctl-pol — not listed as required here #
This property controls the polarity of current that is accumulated to calculate charge and energy so that, they can be only accumulated for positive current for example. Since there are two sets of registers for the accumulated values, this entry can also have two items which sets energy1/charge1 and energy2/charger2 respectively. Check table 12 of the datasheet for more information on the supported options.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Minimum number of items (minItems): 2
Maximum number of items (maxItems): 2
Array item rules (items) #
Allowed values (
enum):0,1,2,3Default value (
default):0
adi,accumulation-deadband-microamp — not listed as required here #
This property controls the Accumulation Dead band which allows to set the level of current below which no accumulation takes place.
Maximum value (maximum): 255
Default value (default): 0
adi,gpio-out-pol — not listed as required here #
This property controls the GPIO polarity. Setting it to one makes the GPIO active high, setting it to zero makets it active low. When this property is present, the GPIO is automatically configured as output and set to control a fan as a function of measured temperature.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 0
adi,gpio-in-accum — not listed as required here #
When set, this property sets the GPIO as input. It is then used to control the accumulation of charge, energy and time. This function can be enabled/configured separately for each of the two sets of accumulation registers. Check table 13 of the datasheet for more information on the supported options. This property cannot be used together with adi,gpio-out-pol.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Minimum number of items (minItems): 2
Maximum number of items (maxItems): 2
Array item rules (items) #
Allowed values (
enum):0,1,2Default value (
default):0
Required in this object (required): "compatible", "reg"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
spi {
#address-cells = <1>;
#size-cells = <0>;
ltc2947_spi: ltc2947@0 {
compatible = "adi,ltc2947";
reg = <0>;
/* accumulation takes place always for energ1/charge1. */
/* accumulation only on positive current for energy2/charge2. */
adi,accumulator-ctl-pol = <0 1>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)