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-v5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

- Fix typo in Kconfig SENSORS_IR35221 option

- Fix potential memory leak in acpi_power_meter_add()

- Make sure the OVERT mask is set correctly in max6697 driver

- In PMBus core, fix page vs. register when accessing fans

- Mark is_visible functions static in bt1-pvt driver

- Define Temp- and Volt-to-N poly as maybe-unused in bt1-pvt driver

* tag 'hwmon-for-v5.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (pmbus) fix a typo in Kconfig SENSORS_IR35221 option
hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add()
hwmon: (max6697) Make sure the OVERT mask is set correctly
hwmon: (pmbus) Fix page vs. register when accessing fans
hwmon: (bt1-pvt) Mark is_visible functions static
hwmon: (bt1-pvt) Define Temp- and Volt-to-N poly as maybe-unused

+18 -15
+3 -1
drivers/hwmon/acpi_power_meter.c
··· 883 883 884 884 res = setup_attrs(resource); 885 885 if (res) 886 - goto exit_free; 886 + goto exit_free_capability; 887 887 888 888 resource->hwmon_dev = hwmon_device_register(&device->dev); 889 889 if (IS_ERR(resource->hwmon_dev)) { ··· 896 896 897 897 exit_remove: 898 898 remove_attrs(resource); 899 + exit_free_capability: 900 + free_capabilities(resource); 899 901 exit_free: 900 902 kfree(resource); 901 903 exit:
+6 -6
drivers/hwmon/bt1-pvt.c
··· 64 64 * 48380, 65 65 * where T = [-48380, 147438] mC and N = [0, 1023]. 66 66 */ 67 - static const struct pvt_poly poly_temp_to_N = { 67 + static const struct pvt_poly __maybe_unused poly_temp_to_N = { 68 68 .total_divider = 10000, 69 69 .terms = { 70 70 {4, 18322, 10000, 10000}, ··· 96 96 * N = (18658e-3*V - 11572) / 10, 97 97 * V = N * 10^5 / 18658 + 11572 * 10^4 / 18658. 98 98 */ 99 - static const struct pvt_poly poly_volt_to_N = { 99 + static const struct pvt_poly __maybe_unused poly_volt_to_N = { 100 100 .total_divider = 10, 101 101 .terms = { 102 102 {1, 18658, 1000, 1}, ··· 300 300 return IRQ_HANDLED; 301 301 } 302 302 303 - inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type) 303 + static inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type) 304 304 { 305 305 return 0644; 306 306 } 307 307 308 - inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type) 308 + static inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type) 309 309 { 310 310 return 0444; 311 311 } ··· 462 462 463 463 #define pvt_soft_isr NULL 464 464 465 - inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type) 465 + static inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type) 466 466 { 467 467 return 0; 468 468 } 469 469 470 - inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type) 470 + static inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type) 471 471 { 472 472 return 0; 473 473 }
+4 -3
drivers/hwmon/max6697.c
··· 38 38 * Map device tree / platform data register bit map to chip bit map. 39 39 * Applies to alert register and over-temperature register. 40 40 */ 41 - #define MAX6697_MAP_BITS(reg) ((((reg) & 0x7e) >> 1) | \ 41 + #define MAX6697_ALERT_MAP_BITS(reg) ((((reg) & 0x7e) >> 1) | \ 42 42 (((reg) & 0x01) << 6) | ((reg) & 0x80)) 43 + #define MAX6697_OVERT_MAP_BITS(reg) (((reg) >> 1) | (((reg) & 0x01) << 7)) 43 44 44 45 #define MAX6697_REG_STAT(n) (0x44 + (n)) 45 46 ··· 563 562 return ret; 564 563 565 564 ret = i2c_smbus_write_byte_data(client, MAX6697_REG_ALERT_MASK, 566 - MAX6697_MAP_BITS(pdata->alert_mask)); 565 + MAX6697_ALERT_MAP_BITS(pdata->alert_mask)); 567 566 if (ret < 0) 568 567 return ret; 569 568 570 569 ret = i2c_smbus_write_byte_data(client, MAX6697_REG_OVERT_MASK, 571 - MAX6697_MAP_BITS(pdata->over_temperature_mask)); 570 + MAX6697_OVERT_MAP_BITS(pdata->over_temperature_mask)); 572 571 if (ret < 0) 573 572 return ret; 574 573
+1 -1
drivers/hwmon/pmbus/Kconfig
··· 71 71 Infineon IR35221 controller. 72 72 73 73 This driver can also be built as a module. If so, the module will 74 - be called ir35521. 74 + be called ir35221. 75 75 76 76 config SENSORS_IR38064 77 77 tristate "Infineon IR38064"
+4 -4
drivers/hwmon/pmbus/pmbus_core.c
··· 1869 1869 struct pmbus_sensor *sensor; 1870 1870 1871 1871 sensor = pmbus_add_sensor(data, "fan", "target", index, page, 1872 - PMBUS_VIRT_FAN_TARGET_1 + id, 0xff, PSC_FAN, 1872 + 0xff, PMBUS_VIRT_FAN_TARGET_1 + id, PSC_FAN, 1873 1873 false, false, true); 1874 1874 1875 1875 if (!sensor) ··· 1880 1880 return 0; 1881 1881 1882 1882 sensor = pmbus_add_sensor(data, "pwm", NULL, index, page, 1883 - PMBUS_VIRT_PWM_1 + id, 0xff, PSC_PWM, 1883 + 0xff, PMBUS_VIRT_PWM_1 + id, PSC_PWM, 1884 1884 false, false, true); 1885 1885 1886 1886 if (!sensor) 1887 1887 return -ENOMEM; 1888 1888 1889 1889 sensor = pmbus_add_sensor(data, "pwm", "enable", index, page, 1890 - PMBUS_VIRT_PWM_ENABLE_1 + id, 0xff, PSC_PWM, 1890 + 0xff, PMBUS_VIRT_PWM_ENABLE_1 + id, PSC_PWM, 1891 1891 true, false, false); 1892 1892 1893 1893 if (!sensor) ··· 1929 1929 continue; 1930 1930 1931 1931 if (pmbus_add_sensor(data, "fan", "input", index, 1932 - page, pmbus_fan_registers[f], 0xff, 1932 + page, 0xff, pmbus_fan_registers[f], 1933 1933 PSC_FAN, true, true, true) == NULL) 1934 1934 return -ENOMEM; 1935 1935