.. | .. |
---|
17 | 17 | enum chips {pfe1100, pfe3000}; |
---|
18 | 18 | |
---|
19 | 19 | /* |
---|
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. |
---|
24 | 25 | */ |
---|
25 | | -static struct pmbus_platform_data pfe3000_plat_data = { |
---|
| 26 | +static struct pmbus_platform_data pfe_plat_data = { |
---|
26 | 27 | .flags = PMBUS_SKIP_STATUS_CHECK, |
---|
27 | 28 | }; |
---|
28 | 29 | |
---|
.. | .. |
---|
94 | 95 | int model; |
---|
95 | 96 | |
---|
96 | 97 | model = (int)i2c_match_id(pfe_device_id, client)->driver_data; |
---|
| 98 | + client->dev.platform_data = &pfe_plat_data; |
---|
97 | 99 | |
---|
98 | 100 | /* |
---|
99 | 101 | * PFE3000-12-069RA devices may not stay in page 0 during device |
---|
100 | 102 | * probe which leads to probe failure (read status word failed). |
---|
101 | 103 | * So let's set the device to page 0 at the beginning. |
---|
102 | 104 | */ |
---|
103 | | - if (model == pfe3000) { |
---|
104 | | - client->dev.platform_data = &pfe3000_plat_data; |
---|
| 105 | + if (model == pfe3000) |
---|
105 | 106 | i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0); |
---|
106 | | - } |
---|
107 | 107 | |
---|
108 | 108 | return pmbus_do_probe(client, &pfe_driver_info[model]); |
---|
109 | 109 | } |
---|