Path: blob/master/Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/hwmon/adi,ltc2947.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices LTC2947 high precision power and energy monitor78maintainers:9- Nuno Sá <nuno.sa@analog.com>1011description: |12Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C.1314https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf1516properties:17compatible:18enum:19- adi,ltc29472021reg:22maxItems: 12324clocks:25description:26The LTC2947 uses either a trimmed internal oscillator or an external clock27as the time base for determining the integration period to represent time,28charge and energy. When an external clock is used, this property must be29set accordingly.30maxItems: 13132adi,accumulator-ctl-pol:33description:34This property controls the polarity of current that is accumulated to35calculate charge and energy so that, they can be only accumulated for36positive current for example. Since there are two sets of registers for37the accumulated values, this entry can also have two items which sets38energy1/charge1 and energy2/charger2 respectively. Check table 12 of the39datasheet for more information on the supported options.40$ref: /schemas/types.yaml#/definitions/uint32-array41minItems: 242maxItems: 243items:44enum: [0, 1, 2, 3]45default: 04647adi,accumulation-deadband-microamp:48description:49This property controls the Accumulation Dead band which allows to set the50level of current below which no accumulation takes place.51maximum: 25552default: 05354adi,gpio-out-pol:55description:56This property controls the GPIO polarity. Setting it to one makes the GPIO57active high, setting it to zero makets it active low. When this property58is present, the GPIO is automatically configured as output and set to59control a fan as a function of measured temperature.60$ref: /schemas/types.yaml#/definitions/uint3261enum: [0, 1]62default: 06364adi,gpio-in-accum:65description:66When set, this property sets the GPIO as input. It is then used to control67the accumulation of charge, energy and time. This function can be68enabled/configured separately for each of the two sets of accumulation69registers. Check table 13 of the datasheet for more information on the70supported options. This property cannot be used together with71adi,gpio-out-pol.72$ref: /schemas/types.yaml#/definitions/uint32-array73minItems: 274maxItems: 275items:76enum: [0, 1, 2]77default: 07879required:80- compatible81- reg828384additionalProperties: false8586examples:87- |88spi {89#address-cells = <1>;90#size-cells = <0>;9192ltc2947_spi: ltc2947@0 {93compatible = "adi,ltc2947";94reg = <0>;95/* accumulation takes place always for energ1/charge1. */96/* accumulation only on positive current for energy2/charge2. */97adi,accumulator-ctl-pol = <0 1>;98};99};100...101102103