Skip to content

Commit c27ea95

Browse files
committed
Merge tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck: "New drivers: - driver for Sophgo SG2042 external hardware monitor - thermal sensor driver for Surface Aggregator Module Added support to existing drivers: - oxp-sensors: Support for multiple new devices. - nct6775: Added G15CF to ASUS WMI monitoring list Modernizations: - driver cleanup and update to use with_info API: ina2xx, lm92, lm95234, max1619, max1668, and max6697. API updates: - removed unused devm_hwmon_device_unregister() API function Other notable changes - implement and use generic bus access delay for pmbus drivers - use with scoped for each OF child loop in several drivers - module unloading fixes for gsc-hwmon and ntc_thermistor drivers - converted various drivers to use multi-byte regmap operations - adt7475: Improved devicetree based configuration - ltc2947: Move to firmware agnostic API - ltc2978: Converted devicetree description to yaml - max16065: Addressed overflows when writing limit attributes Various other minor cleanups, fixes and improvements" * tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (96 commits) hwmon: Remove devm_hwmon_device_unregister() API function hwmon: (sch5636) Print unknown ID in error string via %*pE hwmon: (sht21) Use %*ph to print small buffer hwmon: (pmbus/mpq7932) Constify struct regulator_desc hwmon: pmbus: pli12096bc: Add write delay hwmon: pmbus: zl6100: Use generic code hwmon: pmbus: ucd9000: Use generic code hwmon: pmbus: max15301: Use generic code hwmon: pmbus: Implement generic bus access delay hwmon: (ina2xx) Use shunt voltage to calculate current hwmon: (ina2xx) Add support for current limits hwmon: (ina2xx) Pass register to alert limit write functions hwmon: (ina2xx) Convert to use with_info hwmon API hwmon: (ina2xx) Move ina2xx_get_value() hwmon: (ina2xx) Set alert latch hwmon: (ina2xx) Consolidate chip initialization code hwmon: (ina2xx) Fix various overflow issues hwmon: (ina2xx) Re-initialize chip using regmap functions hwmon: (ina2xx) Use local regmap pointer if used more than once hwmon: (ina2xx) Mark regmap_config as const ...
2 parents 39b3f4e + 2cb4acf commit c27ea95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3670
-2810
lines changed

Documentation/devicetree/bindings/hwmon/adt7475.yaml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,31 @@ properties:
4545
the pwm uses a logic low output for 100% duty cycle. If set to 1 the pwm
4646
uses a logic high output for 100% duty cycle.
4747
$ref: /schemas/types.yaml#/definitions/uint32-array
48+
deprecated: true
4849
minItems: 3
4950
maxItems: 3
5051
items:
5152
enum: [0, 1]
5253
default: 1
5354

55+
"#pwm-cells":
56+
const: 4
57+
description: |
58+
Number of cells in a PWM specifier.
59+
- 0: The PWM channel
60+
- 1: The PWM period in nanoseconds
61+
- 90909091 (11 Hz)
62+
- 71428571 (14 Hz)
63+
- 45454545 (22 Hz)
64+
- 34482759 (29 Hz)
65+
- 28571429 (35 Hz)
66+
- 22727273 (44 Hz)
67+
- 17241379 (58 Hz)
68+
- 11363636 (88 Hz)
69+
- 44444 (22 kHz)
70+
- 2: PWM flags 0 or PWM_POLARITY_INVERTED
71+
- 3: The default PWM duty cycle in nanoseconds
72+
5473
patternProperties:
5574
"^adi,bypass-attenuator-in[0-4]$":
5675
description: |
@@ -81,6 +100,10 @@ patternProperties:
81100
- smbalert#
82101
- gpio
83102

103+
"^fan-[0-9]+$":
104+
$ref: fan-common.yaml#
105+
unevaluatedProperties: false
106+
84107
required:
85108
- compatible
86109
- reg
@@ -89,17 +112,27 @@ additionalProperties: false
89112

90113
examples:
91114
- |
115+
#include <dt-bindings/pwm/pwm.h>
92116
i2c {
93117
#address-cells = <1>;
94118
#size-cells = <0>;
95119
96-
hwmon@2e {
120+
pwm: hwmon@2e {
97121
compatible = "adi,adt7476";
98122
reg = <0x2e>;
99123
adi,bypass-attenuator-in0 = <1>;
100124
adi,bypass-attenuator-in1 = <0>;
101-
adi,pwm-active-state = <1 0 1>;
102125
adi,pin10-function = "smbalert#";
103126
adi,pin14-function = "tach4";
127+
#pwm-cells = <4>;
128+
129+
/* PWMs at 22.5 kHz frequency, 50% duty*/
130+
fan-0 {
131+
pwms = <&pwm 0 44444 0 22222>;
132+
};
133+
134+
fan-1 {
135+
pwms = <&pwm 2 44444 0 22222>;
136+
};
104137
};
105138
};
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/lltc,ltc2978.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Octal Digital Power-supply monitor/supervisor/sequencer/margin controller.
8+
9+
maintainers:
10+
- Frank Li <Frank.Li@nxp.com>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- lltc,ltc2972
16+
- lltc,ltc2974
17+
- lltc,ltc2975
18+
- lltc,ltc2977
19+
- lltc,ltc2978
20+
- lltc,ltc2979
21+
- lltc,ltc2980
22+
- lltc,ltc3880
23+
- lltc,ltc3882
24+
- lltc,ltc3883
25+
- lltc,ltc3884
26+
- lltc,ltc3886
27+
- lltc,ltc3887
28+
- lltc,ltc3889
29+
- lltc,ltc7880
30+
- lltc,ltm2987
31+
- lltc,ltm4664
32+
- lltc,ltm4675
33+
- lltc,ltm4676
34+
- lltc,ltm4677
35+
- lltc,ltm4678
36+
- lltc,ltm4680
37+
- lltc,ltm4686
38+
- lltc,ltm4700
39+
40+
reg:
41+
maxItems: 1
42+
43+
regulators:
44+
type: object
45+
description: |
46+
list of regulators provided by this controller.
47+
Valid names of regulators depend on number of supplies supported per device:
48+
* ltc2972 vout0 - vout1
49+
* ltc2974, ltc2975 : vout0 - vout3
50+
* ltc2977, ltc2979, ltc2980, ltm2987 : vout0 - vout7
51+
* ltc2978 : vout0 - vout7
52+
* ltc3880, ltc3882, ltc3884, ltc3886, ltc3887, ltc3889 : vout0 - vout1
53+
* ltc7880 : vout0 - vout1
54+
* ltc3883 : vout0
55+
* ltm4664 : vout0 - vout1
56+
* ltm4675, ltm4676, ltm4677, ltm4678 : vout0 - vout1
57+
* ltm4680, ltm4686 : vout0 - vout1
58+
* ltm4700 : vout0 - vout1
59+
60+
patternProperties:
61+
"^vout[0-7]$":
62+
$ref: /schemas/regulator/regulator.yaml#
63+
type: object
64+
unevaluatedProperties: false
65+
66+
additionalProperties: false
67+
68+
required:
69+
- compatible
70+
- reg
71+
72+
additionalProperties: false
73+
74+
examples:
75+
- |
76+
i2c {
77+
#address-cells = <1>;
78+
#size-cells = <0>;
79+
80+
regulator@5e {
81+
compatible = "lltc,ltc2978";
82+
reg = <0x5e>;
83+
84+
regulators {
85+
vout0 {
86+
regulator-name = "FPGA-2.5V";
87+
};
88+
vout2 {
89+
regulator-name = "FPGA-1.5V";
90+
};
91+
};
92+
};
93+
};
94+

Documentation/devicetree/bindings/hwmon/ltc2978.txt

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/maxim,max31790.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: The Maxim MAX31790 Fan Controller
8+
9+
maintainers:
10+
- Guenter Roeck <linux@roeck-us.net>
11+
- Chanh Nguyen <chanh@os.amperecomputing.com>
12+
13+
description: >
14+
The MAX31790 controls the speeds of up to six fans using six
15+
independent PWM outputs. The desired fan speeds (or PWM duty cycles)
16+
are written through the I2C interface.
17+
18+
Datasheets:
19+
https://datasheets.maximintegrated.com/en/ds/MAX31790.pdf
20+
21+
properties:
22+
compatible:
23+
const: maxim,max31790
24+
25+
reg:
26+
maxItems: 1
27+
28+
clocks:
29+
maxItems: 1
30+
31+
resets:
32+
maxItems: 1
33+
34+
"#pwm-cells":
35+
const: 1
36+
37+
patternProperties:
38+
"^fan-[0-9]+$":
39+
$ref: fan-common.yaml#
40+
unevaluatedProperties: false
41+
42+
required:
43+
- compatible
44+
- reg
45+
46+
additionalProperties: false
47+
48+
examples:
49+
- |
50+
i2c {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
pwm_provider: fan-controller@20 {
55+
compatible = "maxim,max31790";
56+
reg = <0x20>;
57+
clocks = <&sys_clk>;
58+
resets = <&reset 0>;
59+
#pwm-cells = <1>;
60+
61+
fan-0 {
62+
pwms = <&pwm_provider 1>;
63+
};
64+
65+
fan-1 {
66+
pwms = <&pwm_provider 2>;
67+
};
68+
};
69+
};
70+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/sophgo,sg2042-hwmon-mcu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Sophgo SG2042 onboard MCU support
8+
9+
maintainers:
10+
- Inochi Amaoto <inochiama@outlook.com>
11+
12+
properties:
13+
compatible:
14+
const: sophgo,sg2042-hwmon-mcu
15+
16+
reg:
17+
maxItems: 1
18+
19+
"#thermal-sensor-cells":
20+
const: 1
21+
22+
required:
23+
- compatible
24+
- reg
25+
- "#thermal-sensor-cells"
26+
27+
allOf:
28+
- $ref: /schemas/thermal/thermal-sensor.yaml#
29+
30+
unevaluatedProperties: false
31+
32+
examples:
33+
- |
34+
i2c {
35+
#address-cells = <1>;
36+
#size-cells = <0>;
37+
38+
hwmon@17 {
39+
compatible = "sophgo,sg2042-hwmon-mcu";
40+
reg = <0x17>;
41+
#thermal-sensor-cells = <1>;
42+
};
43+
};

Documentation/hwmon/hwmon-kernel-api.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ register/unregister functions::
3838

3939
void hwmon_device_unregister(struct device *dev);
4040

41-
void devm_hwmon_device_unregister(struct device *dev);
42-
4341
char *hwmon_sanitize_name(const char *name);
4442

4543
char *devm_hwmon_sanitize_name(struct device *dev, const char *name);
@@ -64,11 +62,6 @@ monitoring device structure. This function must be called from the driver
6462
remove function if the hardware monitoring device was registered with
6563
hwmon_device_register_with_info.
6664

67-
devm_hwmon_device_unregister does not normally have to be called. It is only
68-
needed for error handling, and only needed if the driver probe fails after
69-
the call to devm_hwmon_device_register_with_info and if the automatic (device
70-
managed) removal would be too late.
71-
7265
All supported hwmon device registration functions only accept valid device
7366
names. Device names including invalid characters (whitespace, '*', or '-')
7467
will be rejected. The 'name' parameter is mandatory.

Documentation/hwmon/ina2xx.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ Sysfs entries for ina226, ina230 and ina231 only
9999
------------------------------------------------
100100

101101
======================= ====================================================
102+
curr1_lcrit Critical low current
103+
curr1_crit Critical high current
104+
curr1_lcrit_alarm Current critical low alarm
105+
curr1_crit_alarm Current critical high alarm
102106
in0_lcrit Critical low shunt voltage
103107
in0_crit Critical high shunt voltage
104108
in0_lcrit_alarm Shunt voltage critical low alarm

Documentation/hwmon/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ Hardware Monitoring Kernel Drivers
206206
sch5636
207207
scpi-hwmon
208208
sfctemp
209+
sg2042-mcu
209210
sht15
210211
sht21
211212
sht3x

0 commit comments

Comments
 (0)