Skip to content

Commit 14cf45f

Browse files
PatrickRudolphgroeck
authored andcommitted
hwmon: pmbus: Reduce clear fault page invocations
Observing I2C traffic revealed consecutive transmission of CLEAR_FAULT commands. While this doesn't cause issues, it extends driver probe time. Avoid invoking pmbus_clear_fault_page for virtual registers, as they're managed by the driver, not the chip. TEST: Verified using an I2C bus analyzer that only one CLEAR_FAULT command is send instead 5 in a row. Signed-off-by: Patrick Rudolph <[email protected]> Signed-off-by: Naresh Solanki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 7d9be29 commit 14cf45f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hwmon/pmbus/pmbus_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@ static bool pmbus_check_register(struct i2c_client *client,
561561
rv = pmbus_check_status_cml(client);
562562
if (rv < 0 && (data->flags & PMBUS_READ_STATUS_AFTER_FAILED_CHECK))
563563
data->read_status(client, -1);
564-
pmbus_clear_fault_page(client, -1);
564+
if (reg < PMBUS_VIRT_BASE)
565+
pmbus_clear_fault_page(client, -1);
565566
return rv >= 0;
566567
}
567568

0 commit comments

Comments
 (0)