Skip to content

Commit 3d9e350

Browse files
committed
Merge tag 'hwmon-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck: - Add support for Texas Instruments TMP512/513 - Add support for LTC2947 - Add support for BEL PFE1100 and PFE3000 - Various minor improvements and fixes * tag 'hwmon-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: dell-smm-hwmon: Add documentation hwmon: (dell-smm) Add support for disabling automatic BIOS fan control hwmon: Add driver for Texas Instruments TMP512/513 sensor chips. dt-bindings: hwmon: Add TMP512/513 docs: hwmon: Document bel-pfe pmbus driver hwmon: (pmbus) add driver for BEL PFE1100 and PFE3000 dt-bindings: hwmon: Add ltc2947 documentation hwmon: Add support for ltc2947 hwmon: (ina3221) Add summation feature support hwmon: (tmp421) Allow reading at 2Hz instead of 0.5Hz hwmon: (w83793d) remove redundant assignment to variable res hwmon: (pmbus/ibm-cffps) Add version detection capability dt-bindings: hwmon: Document ibm,cffps compatible string hwmon: abituguru: make array probe_order static, makes object smaller hwmon: (applesmc) switch to using input device polling mode hwmon: (aspeed-pwm-tacho) Use devm_platform_ioremap_resource() in aspeed_pwm_tacho_probe() hwmon: (pmbus/ibm-cffps) Fix LED blink behavior hwmon: (pmbus/ibm-cffps) Switch LEDs to blocking brightness call
2 parents 00074a7 + 4a1288f commit 3d9e350

28 files changed

Lines changed: 3288 additions & 78 deletions
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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+
...

‎Documentation/devicetree/bindings/hwmon/ibm,cffps1.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Required properties:
55
- compatible : Must be one of the following:
66
"ibm,cffps1"
77
"ibm,cffps2"
8+
or "ibm,cffps" if the system
9+
must support any version of the
10+
power supply
811
- reg = < I2C bus address >; : Address of the power supply on the
912
I2C bus.
1013

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
5+
$id: http://devicetree.org/schemas/hwmon/ti,tmp513.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: TMP513/512 system monitor sensor
9+
10+
maintainers:
11+
- Eric Tremblay <etremblay@distech-controls.com>
12+
13+
description: |
14+
The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors
15+
that include remote sensors, a local temperature sensor, and a high-side
16+
current shunt monitor. These system monitors have the capability of measuring
17+
remote temperatures, on-chip temperatures, and system voltage/power/current
18+
consumption.
19+
20+
Datasheets:
21+
http://www.ti.com/lit/gpn/tmp513
22+
http://www.ti.com/lit/gpn/tmp512
23+
24+
25+
properties:
26+
compatible:
27+
enum:
28+
- ti,tmp512
29+
- ti,tmp513
30+
31+
reg:
32+
maxItems: 1
33+
34+
shunt-resistor-micro-ohms:
35+
description: |
36+
If 0, the calibration process will be skiped and the current and power
37+
measurement engine will not work. Temperature and voltage measurement
38+
will continue to work. The shunt value also need to respect:
39+
rshunt <= pga-gain * 40 * 1000 * 1000.
40+
If not, it's not possible to compute a valid calibration value.
41+
default: 1000
42+
43+
ti,pga-gain:
44+
description: |
45+
The gain value for the PGA function. This is 8, 4, 2 or 1.
46+
The PGA gain affect the shunt voltage range.
47+
The range will be equal to: pga-gain * 40mV
48+
allOf:
49+
- $ref: /schemas/types.yaml#/definitions/uint32
50+
enum: [1, 2, 4, 8]
51+
default: 8
52+
53+
ti,bus-range-microvolt:
54+
description: |
55+
This is the operating range of the bus voltage in microvolt
56+
allOf:
57+
- $ref: /schemas/types.yaml#/definitions/uint32
58+
enum: [16000000, 32000000]
59+
default: 32000000
60+
61+
ti,nfactor:
62+
description: |
63+
Array of three(TMP513) or two(TMP512) n-Factor value for each remote
64+
temperature channel.
65+
See datasheet Table 11 for n-Factor range list and value interpretation.
66+
allOf:
67+
- $ref: /schemas/types.yaml#definitions/uint32-array
68+
- minItems: 2
69+
maxItems: 3
70+
items:
71+
default: 0x00
72+
minimum: 0x00
73+
maximum: 0xFF
74+
75+
required:
76+
- compatible
77+
- reg
78+
79+
examples:
80+
- |
81+
i2c {
82+
#address-cells = <1>;
83+
#size-cells = <0>;
84+
85+
tmp513@5c {
86+
compatible = "ti,tmp513";
87+
reg = <0x5C>;
88+
shunt-resistor-micro-ohms = <330000>;
89+
ti,bus-range-microvolt = <32000000>;
90+
ti,pga-gain = <8>;
91+
ti,nfactor = <0x1 0xF3 0x00>;
92+
};
93+
};

‎Documentation/hwmon/bel-pfe.rst‎

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
Kernel driver bel-pfe
2+
======================
3+
4+
Supported chips:
5+
6+
* BEL PFE1100
7+
8+
Prefixes: 'pfe1100'
9+
10+
Addresses scanned: -
11+
12+
Datasheet: https://www.belfuse.com/resources/datasheets/powersolutions/ds-bps-pfe1100-12-054xa.pdf
13+
14+
* BEL PFE3000
15+
16+
Prefixes: 'pfe3000'
17+
18+
Addresses scanned: -
19+
20+
Datasheet: https://www.belfuse.com/resources/datasheets/powersolutions/ds-bps-pfe3000-series.pdf
21+
22+
Author: Tao Ren <rentao.bupt@gmail.com>
23+
24+
25+
Description
26+
-----------
27+
28+
This driver supports hardware monitoring for below power supply devices
29+
which support PMBus Protocol:
30+
31+
* BEL PFE1100
32+
33+
1100 Watt AC to DC power-factor-corrected (PFC) power supply.
34+
PMBus Communication Manual is not publicly available.
35+
36+
* BEL PFE3000
37+
38+
3000 Watt AC/DC power-factor-corrected (PFC) and DC-DC power supply.
39+
PMBus Communication Manual is not publicly available.
40+
41+
The driver is a client driver to the core PMBus driver. Please see
42+
Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
43+
44+
45+
Usage Notes
46+
-----------
47+
48+
This driver does not auto-detect devices. You will have to instantiate the
49+
devices explicitly. Please see Documentation/i2c/instantiating-devices.rst for
50+
details.
51+
52+
Example: the following will load the driver for an PFE3000 at address 0x20
53+
on I2C bus #1::
54+
55+
$ modprobe bel-pfe
56+
$ echo pfe3000 0x20 > /sys/bus/i2c/devices/i2c-1/new_device
57+
58+
59+
Platform data support
60+
---------------------
61+
62+
The driver supports standard PMBus driver platform data.
63+
64+
65+
Sysfs entries
66+
-------------
67+
68+
======================= =======================================================
69+
curr1_label "iin"
70+
curr1_input Measured input current
71+
curr1_max Input current max value
72+
curr1_max_alarm Input current max alarm
73+
74+
curr[2-3]_label "iout[1-2]"
75+
curr[2-3]_input Measured output current
76+
curr[2-3]_max Output current max value
77+
curr[2-3]_max_alarm Output current max alarm
78+
79+
fan[1-2]_input Fan 1 and 2 speed in RPM
80+
fan1_target Set fan speed reference for both fans
81+
82+
in1_label "vin"
83+
in1_input Measured input voltage
84+
in1_crit Input voltage critical max value
85+
in1_crit_alarm Input voltage critical max alarm
86+
in1_lcrit Input voltage critical min value
87+
in1_lcrit_alarm Input voltage critical min alarm
88+
in1_max Input voltage max value
89+
in1_max_alarm Input voltage max alarm
90+
91+
in2_label "vcap"
92+
in2_input Hold up capacitor voltage
93+
94+
in[3-8]_label "vout[1-3,5-7]"
95+
in[3-8]_input Measured output voltage
96+
in[3-4]_alarm vout[1-2] output voltage alarm
97+
98+
power[1-2]_label "pin[1-2]"
99+
power[1-2]_input Measured input power
100+
power[1-2]_alarm Input power high alarm
101+
102+
power[3-4]_label "pout[1-2]"
103+
power[3-4]_input Measured output power
104+
105+
temp[1-3]_input Measured temperature
106+
temp[1-3]_alarm Temperature alarm
107+
======================= =======================================================
108+
109+
.. note::
110+
111+
- curr3, fan2, vout[2-7], vcap, pin2, pout2 and temp3 attributes only
112+
exist for PFE3000.

0 commit comments

Comments
 (0)