All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pmbus:max31785: Support revision "B"
@ 2021-02-01 16:50 Matthew Barth
  2021-02-01 19:43 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Barth @ 2021-02-01 16:50 UTC (permalink / raw)
  To: linux-hwmon, linux-kernel, linux, jdelvare; +Cc: Matthew Barth, joel, andrew

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.

Signed-off-by: Matthew Barth <msbarth@linux.ibm.com>
---
 drivers/hwmon/pmbus/max31785.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/pmbus/max31785.c b/drivers/hwmon/pmbus/max31785.c
index e5a9f4019cd5..e636a65061df 100644
--- a/drivers/hwmon/pmbus/max31785.c
+++ b/drivers/hwmon/pmbus/max31785.c
@@ -17,6 +17,7 @@ enum max31785_regs {
 
 #define MAX31785			0x3030
 #define MAX31785A			0x3040
+#define MAX31785B			0x3061
 
 #define MFR_FAN_CONFIG_DUAL_TACH	BIT(12)
 
@@ -350,12 +351,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", client->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;
 	}
 
@@ -371,6 +373,7 @@ static int max31785_probe(struct i2c_client *client)
 static const struct i2c_device_id max31785_id[] = {
 	{ "max31785", 0 },
 	{ "max31785a", 0 },
+	{ "max31785b", 0 },
 	{ },
 };
 
@@ -379,6 +382,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" },
 	{ },
 };
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pmbus:max31785: Support revision "B"
  2021-02-01 16:50 [PATCH] pmbus:max31785: Support revision "B" Matthew Barth
@ 2021-02-01 19:43 ` Guenter Roeck
  2021-02-01 20:02   ` Matthew Barth
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2021-02-01 19:43 UTC (permalink / raw)
  To: Matthew Barth, linux-hwmon, linux-kernel, jdelvare; +Cc: joel, andrew

On 2/1/21 8:50 AM, Matthew Barth wrote:
> 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.
> 

Is that published somewhere ?

> Signed-off-by: Matthew Barth <msbarth@linux.ibm.com>
> ---
>  drivers/hwmon/pmbus/max31785.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/pmbus/max31785.c b/drivers/hwmon/pmbus/max31785.c
> index e5a9f4019cd5..e636a65061df 100644
> --- a/drivers/hwmon/pmbus/max31785.c
> +++ b/drivers/hwmon/pmbus/max31785.c
> @@ -17,6 +17,7 @@ enum max31785_regs {
>  
>  #define MAX31785			0x3030
>  #define MAX31785A			0x3040
> +#define MAX31785B			0x3061
>  
>  #define MFR_FAN_CONFIG_DUAL_TACH	BIT(12)
>  
> @@ -350,12 +351,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", client->name))

Probably also wants to check for max31785b,

>  			dev_warn(dev, "Expected max3175a, found max31785: cannot provide secondary tachometer readings\n");

and say something like "Expected max3175a/b, ..."

Thanks,
Guenter

>  	} else {
> +		dev_err(dev, "Unrecognized MAX31785 revision: %x\n", ret);
>  		return -ENODEV;
>  	}
>  
> @@ -371,6 +373,7 @@ static int max31785_probe(struct i2c_client *client)
>  static const struct i2c_device_id max31785_id[] = {
>  	{ "max31785", 0 },
>  	{ "max31785a", 0 },
> +	{ "max31785b", 0 },
>  	{ },
>  };
>  
> @@ -379,6 +382,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" },
>  	{ },
>  };
>  
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pmbus:max31785: Support revision "B"
  2021-02-01 19:43 ` Guenter Roeck
@ 2021-02-01 20:02   ` Matthew Barth
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Barth @ 2021-02-01 20:02 UTC (permalink / raw)
  To: Guenter Roeck, linux-hwmon, linux-kernel, jdelvare; +Cc: joel, andrew


On 2/1/21 1:43 PM, Guenter Roeck wrote:
> On 2/1/21 8:50 AM, Matthew Barth wrote:
>> 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.
>>
> Is that published somewhere ?
If you're referring to the issue noted, it is not explicitly published 
anywhere that I'm aware of other than being functionally described on 
pg22 within the MAX31785 datasheet under the 'Dual Fan Applicaitons' 
paragraph(https://datasheets.maximintegrated.com/en/ds/MAX31785.pdf). We 
have worked with Maxim to get this addressed as the method of latching 
the TACHSEL during speed transitions gives windows of being unable to 
detect fan failures of the rotor that is not being read during the 
transition.

In reference to revision "B" being published, Maxim provided a couple 
samples with the issue noted fixed where it was noticed the MFR_REVISION 
bumped to 0x3061. After I had verified the functionality of this 
revision, they have started production of 31785's with this revision "B" 
firmware. I can not speak to if/when they will update their datasheet.
>
>> Signed-off-by: Matthew Barth <msbarth@linux.ibm.com>
>> ---
>>   drivers/hwmon/pmbus/max31785.c | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/hwmon/pmbus/max31785.c b/drivers/hwmon/pmbus/max31785.c
>> index e5a9f4019cd5..e636a65061df 100644
>> --- a/drivers/hwmon/pmbus/max31785.c
>> +++ b/drivers/hwmon/pmbus/max31785.c
>> @@ -17,6 +17,7 @@ enum max31785_regs {
>>   
>>   #define MAX31785			0x3030
>>   #define MAX31785A			0x3040
>> +#define MAX31785B			0x3061
>>   
>>   #define MFR_FAN_CONFIG_DUAL_TACH	BIT(12)
>>   
>> @@ -350,12 +351,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", client->name))
> Probably also wants to check for max31785b,
Good call, will do!
>
>>   			dev_warn(dev, "Expected max3175a, found max31785: cannot provide secondary tachometer readings\n");
> and say something like "Expected max3175a/b, ..."

Thanks,

Matt

>
> Thanks,
> Guenter
>
>>   	} else {
>> +		dev_err(dev, "Unrecognized MAX31785 revision: %x\n", ret);
>>   		return -ENODEV;
>>   	}
>>   
>> @@ -371,6 +373,7 @@ static int max31785_probe(struct i2c_client *client)
>>   static const struct i2c_device_id max31785_id[] = {
>>   	{ "max31785", 0 },
>>   	{ "max31785a", 0 },
>> +	{ "max31785b", 0 },
>>   	{ },
>>   };
>>   
>> @@ -379,6 +382,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" },
>>   	{ },
>>   };
>>   
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-01 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 16:50 [PATCH] pmbus:max31785: Support revision "B" Matthew Barth
2021-02-01 19:43 ` Guenter Roeck
2021-02-01 20:02   ` Matthew Barth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.