Skip to contentSkip to conversation

pmbus:max31785: Support revision "B"

PATCH In review Matthew Barth 3 participants 5 messages Jan 29, 2021 – Feb 2, 2021 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pmbus:max31785: Support revision "B"

There was an issue in how the tach feedbacks of dual rotor fans were reported during any change in fan speeds with revision "A" of the MAX31785. When the fan speeds would transition to a new target speed, the rotor not wired to the TACH input when TACHSEL = 0 would report a speed of 0 until the new target was reached. This has been fixed, resulting in a revision "B" update where the MFR_REVISION of "B" is 0x3061.

---
 drivers/hwmon/pmbus/max31785.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/hwmon/pmbus/max31785.c +5 -1
index cbcd0b2301f4..4de226670069 100644
@@ -20,6 +20,7 @@ enum max31785_regs {
 
 #define MAX31785			0x3030
 #define MAX31785A			0x3040
+#define MAX31785B			0x3061
 
 #define MFR_FAN_CONFIG_DUAL_TACH	BIT(12)
 #define MFR_FAN_CONFIG_TSFO		BIT(9)
@@ -749,12 +750,13 @@ static int max31785_probe(struct i2c_client *client,
 	if (ret < 0)
 		return ret;
 
-	if (ret == MAX31785A) {
+	if (ret == MAX31785A || ret == MAX31785B) {
 		dual_tach = true;
 	} else if (ret == MAX31785) {
 		if (!strcmp("max31785a", id->name))
 			dev_warn(dev, "Expected max3175a, found max31785: cannot provide secondary tachometer readings\n");
 	} else {
+		dev_err(dev, "Unrecognized MAX31785 revision: %x\n", ret);
 		return -ENODEV;
 	}
 
@@ -813,6 +815,7 @@ static int max31785_probe(struct i2c_client *client,
 static const struct i2c_device_id max31785_id[] = {
 	{ "max31785", 0 },
 	{ "max31785a", 0 },
+	{ "max31785b", 0 },
 	{ },
 };
 
@@ -821,6 +824,7 @@ MODULE_DEVICE_TABLE(i2c, max31785_id);
 static const struct of_device_id max31785_of_match[] = {
 	{ .compatible = "maxim,max31785" },
 	{ .compatible = "maxim,max31785a" },
+	{ .compatible = "maxim,max31785b" },
 	{ },
 };
 
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Matthew Barth

There was an issue in how the tach feedbacks of dual rotor fans were reported during any change in fan speeds with revision "A" of the MAX31785. When the fan speeds would transition to a new target speed, the rotor not wired to the TACH input when TACHSEL = 0 would report a speed of 0 until the new target was reached. This has been fixed, resulting in a revision "B" update where the MFR_REVISION of "B" is 0x3061.

Can you please send this upstream?

#2 lore raw
Quoted 12 lines · Andrew Jeffery
Quoted 8 lines · Matthew Barth

There was an issue in how the tach feedbacks of dual rotor fans were reported during any change in fan speeds with revision "A" of the MAX31785. When the fan speeds would transition to a new target speed, the rotor not wired to the TACH input when TACHSEL = 0 would report a speed of 0 until the new target was reached. This has been fixed, resulting in a revision "B" update where the MFR_REVISION of "B" is 0x3061.

Quoted 3 lines
Quoted 1 line

Can you please send this upstream?

+1, I'll merge this into the openbmc tree once you've had it reviewed upstream.

Cheers,

Joel

Quoted 2 lines
#3 lore raw
In reply to Andrew Jeffery
Quoted 10 lines · Andrew Jeffery
Quoted 8 lines · Matthew Barth

There was an issue in how the tach feedbacks of dual rotor fans were reported during any change in fan speeds with revision "A" of the MAX31785. When the fan speeds would transition to a new target speed, the rotor not wired to the TACH input when TACHSEL = 0 would report a speed of 0 until the new target was reached. This has been fixed, resulting in a revision "B" update where the MFR_REVISION of "B" is 0x3061.

Quoted 2 lines
Quoted 1 line

Can you please send this upstream?

Will do. Didn't realize this driver had got accepted upstream.

Matt

Quoted 2 lines
#4 lore raw
Quoted 13 lines · Matthew Barth
Quoted 10 lines · Andrew Jeffery
Quoted 8 lines · Matthew Barth

There was an issue in how the tach feedbacks of dual rotor fans were reported during any change in fan speeds with revision "A" of the MAX31785. When the fan speeds would transition to a new target speed, the rotor not wired to the TACH input when TACHSEL = 0 would report a speed of 0 until the new target was reached. This has been fixed, resulting in a revision "B" update where the MFR_REVISION of "B" is 0x3061.

Quoted 4 lines
Quoted 2 lines
Quoted 1 line

Can you please send this upstream?

Will do. Didn't realize this driver had got accepted upstream.

Thanks. I've merged the version that Guneter committed upstream.

Cheers,

Joel