hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100
commit f38963b9cd0645a336cf30c5da2e89e34e34fec3 upstream.
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: 626bb2f3fb
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
a73d999fdf
commit
db0e1e2abd
@@ -17,12 +17,13 @@
|
|||||||
enum chips {pfe1100, pfe3000};
|
enum chips {pfe1100, pfe3000};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable status check for pfe3000 devices, because some devices report
|
* Disable status check because some devices report communication error
|
||||||
* communication error (invalid command) for VOUT_MODE command (0x20)
|
* (invalid command) for VOUT_MODE command (0x20) although the correct
|
||||||
* although correct VOUT_MODE (0x16) is returned: it leads to incorrect
|
* VOUT_MODE (0x16) is returned: it leads to incorrect exponent in linear
|
||||||
* exponent in linear mode.
|
* mode.
|
||||||
|
* This affects both pfe3000 and pfe1100.
|
||||||
*/
|
*/
|
||||||
static struct pmbus_platform_data pfe3000_plat_data = {
|
static struct pmbus_platform_data pfe_plat_data = {
|
||||||
.flags = PMBUS_SKIP_STATUS_CHECK,
|
.flags = PMBUS_SKIP_STATUS_CHECK,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -94,16 +95,15 @@ static int pfe_pmbus_probe(struct i2c_client *client)
|
|||||||
int model;
|
int model;
|
||||||
|
|
||||||
model = (int)i2c_match_id(pfe_device_id, client)->driver_data;
|
model = (int)i2c_match_id(pfe_device_id, client)->driver_data;
|
||||||
|
client->dev.platform_data = &pfe_plat_data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PFE3000-12-069RA devices may not stay in page 0 during device
|
* PFE3000-12-069RA devices may not stay in page 0 during device
|
||||||
* probe which leads to probe failure (read status word failed).
|
* probe which leads to probe failure (read status word failed).
|
||||||
* So let's set the device to page 0 at the beginning.
|
* So let's set the device to page 0 at the beginning.
|
||||||
*/
|
*/
|
||||||
if (model == pfe3000) {
|
if (model == pfe3000)
|
||||||
client->dev.platform_data = &pfe3000_plat_data;
|
|
||||||
i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
|
i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
|
||||||
}
|
|
||||||
|
|
||||||
return pmbus_do_probe(client, &pfe_driver_info[model]);
|
return pmbus_do_probe(client, &pfe_driver_info[model]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user