Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: hwmon: Add ltc2947 documentation

Document the LTC2947 device devicetree bindings.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20191011114853.159327-2-nuno.sa@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Nuno Sá and committed by
Guenter Roeck
8ae93ea7 9f90fd65

+105
+104
Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/bindings/hwmon/adi,ltc2947.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Analog Devices LTC2947 high precision power and energy monitor 8 + 9 + maintainers: 10 + - Nuno Sá <nuno.sa@analog.com> 11 + 12 + description: | 13 + Analog Devices LTC2947 high precision power and energy monitor over SPI or I2C. 14 + 15 + https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf 16 + 17 + properties: 18 + compatible: 19 + enum: 20 + - adi,ltc2947 21 + 22 + reg: 23 + maxItems: 1 24 + 25 + clocks: 26 + description: 27 + The LTC2947 uses either a trimmed internal oscillator or an external clock 28 + as the time base for determining the integration period to represent time, 29 + charge and energy. When an external clock is used, this property must be 30 + set accordingly. 31 + maxItems: 1 32 + 33 + adi,accumulator-ctl-pol: 34 + description: 35 + This property controls the polarity of current that is accumulated to 36 + calculate charge and energy so that, they can be only accumulated for 37 + positive current for example. Since there are two sets of registers for 38 + the accumulated values, this entry can also have two items which sets 39 + energy1/charge1 and energy2/charger2 respectively. Check table 12 of the 40 + datasheet for more information on the supported options. 41 + allOf: 42 + - $ref: /schemas/types.yaml#/definitions/uint32-array 43 + - minItems: 2 44 + maxItems: 2 45 + items: 46 + enum: [0, 1, 2, 3] 47 + default: 0 48 + 49 + adi,accumulation-deadband-microamp: 50 + description: 51 + This property controls the Accumulation Dead band which allows to set the 52 + level of current below which no accumulation takes place. 53 + allOf: 54 + - $ref: /schemas/types.yaml#/definitions/uint32 55 + maximum: 255 56 + default: 0 57 + 58 + adi,gpio-out-pol: 59 + description: 60 + This property controls the GPIO polarity. Setting it to one makes the GPIO 61 + active high, setting it to zero makets it active low. When this property 62 + is present, the GPIO is automatically configured as output and set to 63 + control a fan as a function of measured temperature. 64 + allOf: 65 + - $ref: /schemas/types.yaml#/definitions/uint32 66 + enum: [0, 1] 67 + default: 0 68 + 69 + adi,gpio-in-accum: 70 + description: 71 + When set, this property sets the GPIO as input. It is then used to control 72 + the accumulation of charge, energy and time. This function can be 73 + enabled/configured separately for each of the two sets of accumulation 74 + registers. Check table 13 of the datasheet for more information on the 75 + supported options. This property cannot be used together with 76 + adi,gpio-out-pol. 77 + allOf: 78 + - $ref: /schemas/types.yaml#/definitions/uint32-array 79 + - minItems: 2 80 + maxItems: 2 81 + items: 82 + enum: [0, 1, 2] 83 + default: 0 84 + 85 + required: 86 + - compatible 87 + - reg 88 + 89 + 90 + examples: 91 + - | 92 + spi { 93 + #address-cells = <1>; 94 + #size-cells = <0>; 95 + 96 + ltc2947_spi: ltc2947@0 { 97 + compatible = "adi,ltc2947"; 98 + reg = <0>; 99 + /* accumulation takes place always for energ1/charge1. */ 100 + /* accumulation only on positive current for energy2/charge2. */ 101 + adi,accumulator-ctl-pol = <0 1>; 102 + }; 103 + }; 104 + ...
+1
MAINTAINERS
··· 9639 9639 F: drivers/hwmon/ltc2947-spi.c 9640 9640 F: drivers/hwmon/ltc2947-i2c.c 9641 9641 F: drivers/hwmon/ltc2947.h 9642 + F: Documentation/devicetree/bindings/hwmon/adi,ltc2947.yaml 9642 9643 9643 9644 LTC4306 I2C MULTIPLEXER DRIVER 9644 9645 M: Michael Hennerich <michael.hennerich@analog.com>