Skip to content

Commit f38963b

Browse files
tao-rengroeck
authored andcommitted
hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100
Skip status check for both pfe1100 and pfe3000 because the communication error is also observed on pfe1100 devices. Signed-off-by: Tao Ren <rentao.bupt@gmail.com> Fixes: 626bb2f hwmon: (pmbus) add driver for BEL PFE1100 and PFE3000 Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230804221403.28931-1-rentao.bupt@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 5d0c230 commit f38963b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/hwmon/pmbus/bel-pfe.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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 @@ static int pfe_pmbus_probe(struct i2c_client *client)
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
}

0 commit comments

Comments
 (0)