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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
"Bug fixes for pmbus, ltc2978, and lineage-pem drivers

Added specific maintainer for some hwmon drivers"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (pmbus/ltc2978) Fix temperature reporting
hwmon: (pmbus) Fix krealloc() misuse in pmbus_add_attribute()
hwmon: (lineage-pem) Add missing terminating entry for pem_[input|fan]_attributes
MAINTAINERS: Add maintainer for MAX6697, INA209, and INA2XX drivers

+42 -11
+25
MAINTAINERS
··· 4005 4005 S: Maintained 4006 4006 F: drivers/usb/atm/ueagle-atm.c 4007 4007 4008 + INA209 HARDWARE MONITOR DRIVER 4009 + M: Guenter Roeck <linux@roeck-us.net> 4010 + L: lm-sensors@lm-sensors.org 4011 + S: Maintained 4012 + F: Documentation/hwmon/ina209 4013 + F: Documentation/devicetree/bindings/i2c/ina209.txt 4014 + F: drivers/hwmon/ina209.c 4015 + 4016 + INA2XX HARDWARE MONITOR DRIVER 4017 + M: Guenter Roeck <linux@roeck-us.net> 4018 + L: lm-sensors@lm-sensors.org 4019 + S: Maintained 4020 + F: Documentation/hwmon/ina2xx 4021 + F: drivers/hwmon/ina2xx.c 4022 + F: include/linux/platform_data/ina2xx.h 4023 + 4008 4024 INDUSTRY PACK SUBSYSTEM (IPACK) 4009 4025 M: Samuel Iglesias Gonsalvez <siglesias@igalia.com> 4010 4026 M: Jens Taprogge <jens.taprogge@taprogge.org> ··· 5113 5097 S: Maintained 5114 5098 F: Documentation/hwmon/max6650 5115 5099 F: drivers/hwmon/max6650.c 5100 + 5101 + MAX6697 HARDWARE MONITOR DRIVER 5102 + M: Guenter Roeck <linux@roeck-us.net> 5103 + L: lm-sensors@lm-sensors.org 5104 + S: Maintained 5105 + F: Documentation/hwmon/max6697 5106 + F: Documentation/devicetree/bindings/i2c/max6697.txt 5107 + F: drivers/hwmon/max6697.c 5108 + F: include/linux/platform_data/max6697.h 5116 5109 5117 5110 MAXIRADIO FM RADIO RECEIVER DRIVER 5118 5111 M: Hans Verkuil <hverkuil@xs4all.nl>
+2
drivers/hwmon/lineage-pem.c
··· 422 422 &sensor_dev_attr_in2_input.dev_attr.attr, 423 423 &sensor_dev_attr_curr1_input.dev_attr.attr, 424 424 &sensor_dev_attr_power1_input.dev_attr.attr, 425 + NULL 425 426 }; 426 427 427 428 static const struct attribute_group pem_input_group = { ··· 433 432 &sensor_dev_attr_fan1_input.dev_attr.attr, 434 433 &sensor_dev_attr_fan2_input.dev_attr.attr, 435 434 &sensor_dev_attr_fan3_input.dev_attr.attr, 435 + NULL 436 436 }; 437 437 438 438 static const struct attribute_group pem_fan_group = {
+8 -6
drivers/hwmon/pmbus/ltc2978.c
··· 59 59 struct ltc2978_data { 60 60 enum chips id; 61 61 int vin_min, vin_max; 62 - int temp_min, temp_max; 62 + int temp_min, temp_max[2]; 63 63 int vout_min[8], vout_max[8]; 64 64 int iout_max[2]; 65 65 int temp2_max; ··· 113 113 ret = pmbus_read_word_data(client, page, 114 114 LTC2978_MFR_TEMPERATURE_PEAK); 115 115 if (ret >= 0) { 116 - if (lin11_to_val(ret) > lin11_to_val(data->temp_max)) 117 - data->temp_max = ret; 118 - ret = data->temp_max; 116 + if (lin11_to_val(ret) 117 + > lin11_to_val(data->temp_max[page])) 118 + data->temp_max[page] = ret; 119 + ret = data->temp_max[page]; 119 120 } 120 121 break; 121 122 case PMBUS_VIRT_RESET_VOUT_HISTORY: ··· 267 266 break; 268 267 case PMBUS_VIRT_RESET_TEMP_HISTORY: 269 268 data->temp_min = 0x7bff; 270 - data->temp_max = 0x7c00; 269 + data->temp_max[page] = 0x7c00; 271 270 ret = ltc2978_clear_peaks(client, page, data->id); 272 271 break; 273 272 default: ··· 324 323 data->vin_min = 0x7bff; 325 324 data->vin_max = 0x7c00; 326 325 data->temp_min = 0x7bff; 327 - data->temp_max = 0x7c00; 326 + for (i = 0; i < ARRAY_SIZE(data->temp_max); i++) 327 + data->temp_max[i] = 0x7c00; 328 328 data->temp2_max = 0x7c00; 329 329 330 330 switch (data->id) {
+7 -5
drivers/hwmon/pmbus/pmbus_core.c
··· 766 766 static int pmbus_add_attribute(struct pmbus_data *data, struct attribute *attr) 767 767 { 768 768 if (data->num_attributes >= data->max_attributes - 1) { 769 - data->max_attributes += PMBUS_ATTR_ALLOC_SIZE; 770 - data->group.attrs = krealloc(data->group.attrs, 771 - sizeof(struct attribute *) * 772 - data->max_attributes, GFP_KERNEL); 773 - if (data->group.attrs == NULL) 769 + int new_max_attrs = data->max_attributes + PMBUS_ATTR_ALLOC_SIZE; 770 + void *new_attrs = krealloc(data->group.attrs, 771 + new_max_attrs * sizeof(void *), 772 + GFP_KERNEL); 773 + if (!new_attrs) 774 774 return -ENOMEM; 775 + data->group.attrs = new_attrs; 776 + data->max_attributes = new_max_attrs; 775 777 } 776 778 777 779 data->group.attrs[data->num_attributes++] = attr;