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-v6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:

- Fix clearing status register bits for chips supporting older
PMBus versions

* tag 'hwmon-for-v6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2

+20 -3
+6
drivers/hwmon/pmbus/pmbus.h
··· 418 418 enum pmbus_data_format { linear = 0, ieee754, direct, vid }; 419 419 enum vrm_version { vr11 = 0, vr12, vr13, imvp9, amd625mv }; 420 420 421 + /* PMBus revision identifiers */ 422 + #define PMBUS_REV_10 0x00 /* PMBus revision 1.0 */ 423 + #define PMBUS_REV_11 0x11 /* PMBus revision 1.1 */ 424 + #define PMBUS_REV_12 0x22 /* PMBus revision 1.2 */ 425 + #define PMBUS_REV_13 0x33 /* PMBus revision 1.3 */ 426 + 421 427 struct pmbus_driver_info { 422 428 int pages; /* Total number of pages */ 423 429 u8 phases[PMBUS_PAGES]; /* Number of phases per page */
+14 -3
drivers/hwmon/pmbus/pmbus_core.c
··· 85 85 86 86 u32 flags; /* from platform data */ 87 87 88 + u8 revision; /* The PMBus revision the device is compliant with */ 89 + 88 90 int exponent[PMBUS_PAGES]; 89 91 /* linear mode: exponent for output voltages */ 90 92 ··· 1097 1095 1098 1096 regval = status & mask; 1099 1097 if (regval) { 1100 - ret = _pmbus_write_byte_data(client, page, reg, regval); 1101 - if (ret) 1102 - goto unlock; 1098 + if (data->revision >= PMBUS_REV_12) { 1099 + ret = _pmbus_write_byte_data(client, page, reg, regval); 1100 + if (ret) 1101 + goto unlock; 1102 + } else { 1103 + pmbus_clear_fault_page(client, page); 1104 + } 1105 + 1103 1106 } 1104 1107 if (s1 && s2) { 1105 1108 s64 v1, v2; ··· 2646 2639 if (ret > 0 && (ret & PB_WP_ANY)) 2647 2640 data->flags |= PMBUS_WRITE_PROTECTED | PMBUS_SKIP_STATUS_CHECK; 2648 2641 } 2642 + 2643 + ret = i2c_smbus_read_byte_data(client, PMBUS_REVISION); 2644 + if (ret >= 0) 2645 + data->revision = ret; 2649 2646 2650 2647 if (data->info->pages) 2651 2648 pmbus_clear_faults(client);