Skip to content

Commit 4a3164e

Browse files
committed
Merge tag 'hwmon-for-v5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck: "Couple of minor hwmon fixes" * tag 'hwmon-for-v5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: dt-bindings: hwmon: (adc128d818) Specify ti,mode property size hwmon: (ntc_thermistor) Fix temperature type reporting hwmon: (occ) Fix power sensor indexing hwmon: (w83773g) Select REGMAP_I2C to fix build error
2 parents 9f3bd8f + d3b018f commit 4a3164e

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

Diff for: Documentation/devicetree/bindings/hwmon/adc128d818.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Required node properties:
2626

2727
Optional node properties:
2828

29-
- ti,mode: Operation mode (see above).
29+
- ti,mode: Operation mode (u8) (see above).
3030

3131

3232
Example (operation mode 2):
3333

3434
adc128d818@1d {
3535
compatible = "ti,adc128d818";
3636
reg = <0x1d>;
37-
ti,mode = <2>;
37+
ti,mode = /bits/ 8 <2>;
3838
};

Diff for: drivers/hwmon/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,7 @@ config SENSORS_VT8231
17591759
config SENSORS_W83773G
17601760
tristate "Nuvoton W83773G"
17611761
depends on I2C
1762+
select REGMAP_I2C
17621763
help
17631764
If you say yes here you get support for the Nuvoton W83773G hardware
17641765
monitoring chip.

Diff for: drivers/hwmon/ntc_thermistor.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ static const struct hwmon_channel_info ntc_chip = {
640640
};
641641

642642
static const u32 ntc_temp_config[] = {
643-
HWMON_T_INPUT, HWMON_T_TYPE,
643+
HWMON_T_INPUT | HWMON_T_TYPE,
644644
0
645645
};
646646

Diff for: drivers/hwmon/occ/common.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,8 @@ static int occ_setup_sensor_attrs(struct occ *occ)
890890
s++;
891891
}
892892
}
893+
894+
s = (sensors->power.num_sensors * 4) + 1;
893895
} else {
894896
for (i = 0; i < sensors->power.num_sensors; ++i) {
895897
s = i + 1;
@@ -918,11 +920,11 @@ static int occ_setup_sensor_attrs(struct occ *occ)
918920
show_power, NULL, 3, i);
919921
attr++;
920922
}
921-
}
922923

923-
if (sensors->caps.num_sensors >= 1) {
924924
s = sensors->power.num_sensors + 1;
925+
}
925926

927+
if (sensors->caps.num_sensors >= 1) {
926928
snprintf(attr->name, sizeof(attr->name), "power%d_label", s);
927929
attr->sensor = OCC_INIT_ATTR(attr->name, 0444, show_caps, NULL,
928930
0, 0);

0 commit comments

Comments
 (0)