hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/hwmon/pmbus/bel-pfe.c
....@@ -17,12 +17,13 @@
1717 enum chips {pfe1100, pfe3000};
1818
1919 /*
20
- * Disable status check for pfe3000 devices, because some devices report
21
- * communication error (invalid command) for VOUT_MODE command (0x20)
22
- * although correct VOUT_MODE (0x16) is returned: it leads to incorrect
23
- * exponent in linear mode.
20
+ * Disable status check because some devices report communication error
21
+ * (invalid command) for VOUT_MODE command (0x20) although the correct
22
+ * VOUT_MODE (0x16) is returned: it leads to incorrect exponent in linear
23
+ * mode.
24
+ * This affects both pfe3000 and pfe1100.
2425 */
25
-static struct pmbus_platform_data pfe3000_plat_data = {
26
+static struct pmbus_platform_data pfe_plat_data = {
2627 .flags = PMBUS_SKIP_STATUS_CHECK,
2728 };
2829
....@@ -94,16 +95,15 @@
9495 int model;
9596
9697 model = (int)i2c_match_id(pfe_device_id, client)->driver_data;
98
+ client->dev.platform_data = &pfe_plat_data;
9799
98100 /*
99101 * PFE3000-12-069RA devices may not stay in page 0 during device
100102 * probe which leads to probe failure (read status word failed).
101103 * So let's set the device to page 0 at the beginning.
102104 */
103
- if (model == pfe3000) {
104
- client->dev.platform_data = &pfe3000_plat_data;
105
+ if (model == pfe3000)
105106 i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
106
- }
107107
108108 return pmbus_do_probe(client, &pfe_driver_info[model]);
109109 }