[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/8] hw/i2c: pmbus: immediately clear faults on request
From: |
Titus Rwantare |
Subject: |
[PATCH v3 7/8] hw/i2c: pmbus: immediately clear faults on request |
Date: |
Mon, 23 Oct 2023 18:08:36 +0000 |
The probing process of the generic pmbus driver generates
faults to determine if functions are available. These faults
were not always cleared resulting in probe failures.
Signed-off-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
---
hw/i2c/pmbus_device.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c
index 3bce39e84e..481e158380 100644
--- a/hw/i2c/pmbus_device.c
+++ b/hw/i2c/pmbus_device.c
@@ -1244,6 +1244,11 @@ static int pmbus_write_data(SMBusDevice *smd, uint8_t
*buf, uint8_t len)
pmdev->in_buf = buf;
pmdev->code = buf[0]; /* PMBus command code */
+
+ if (pmdev->code == PMBUS_CLEAR_FAULTS) {
+ pmbus_clear_faults(pmdev);
+ }
+
if (len == 1) { /* Single length writes are command codes only */
return 0;
}
--
2.42.0.758.gaed0368e0e-goog
- [PATCH v3 0/8] PMBus fixes and new functions, Titus Rwantare, 2023/10/23
- [PATCH v3 2/8] hw/i2c: pmbus: add vout mode bitfields, Titus Rwantare, 2023/10/23
- [PATCH v3 4/8] hw/i2c: pmbus: add VCAP register, Titus Rwantare, 2023/10/23
- [PATCH v3 3/8] hw/i2c: pmbus: add fan support, Titus Rwantare, 2023/10/23
- [PATCH v3 7/8] hw/i2c: pmbus: immediately clear faults on request,
Titus Rwantare <=
- [PATCH v3 1/8] hw/i2c: pmbus add support for block receive, Titus Rwantare, 2023/10/23
- [PATCH v3 6/8] tests/qtest: add tests for ADM1266, Titus Rwantare, 2023/10/23
- [PATCH v3 5/8] hw/sensor: add ADM1266 device model, Titus Rwantare, 2023/10/23
- [PATCH v3 8/8] hw/i2c: pmbus: reset page register for out of range reads, Titus Rwantare, 2023/10/23
- Re: [PATCH v3 0/8] PMBus fixes and new functions, Alex Bennée, 2023/10/23