mbox series

[0/7] hwmon: (max31790) Fixes and improvements

Message ID 20210526154022.3223012-1-linux@roeck-us.net (mailing list archive)
Headers show
Series hwmon: (max31790) Fixes and improvements | expand

Message

Guenter Roeck May 26, 2021, 3:40 p.m. UTC
The following series provides various fixes and improvements for the
max31790 driver.

----------------------------------------------------------------
Guenter Roeck (7):
      hwmon: (max31790) Fix fan speed reporting for fan7..12
      hwmon: (max31790) Report correct current pwm duty cycles
      hwmon: (max31790) Fix pwmX_enable attributes
      hwmon: (max31790) Add support for fanX_enable attributes
      hwmon: (max31790) Clear fan fault after reporting it
      hwmon: (max31790) Detect and report zero fan speed
      hwmon: (max31790) Add support for fanX_min attributes

 Documentation/hwmon/max31790.rst |  17 +++-
 drivers/hwmon/max31790.c         | 171 ++++++++++++++++++++++++++++++---------
 2 files changed, 147 insertions(+), 41 deletions(-)

Comments

Václav Kubernát June 1, 2021, 8:29 a.m. UTC | #1
Hello,

I have tested your patches. It seems like the driver is now a lot more
usable, thanks. What seems to be still unusable for me, is RPM mode.
The chip creates an effort to set the RPM, but it almost never
stabilizes. I think the reason is mainly because the driver doesn't
work with registers like "window" and "pwm rate of change". PWM mode
seems to work fine.

I think some of the patches in my patch series on the chip are now
obsolete. However, I do think at least fanX_div should be implemented.
When testing with Sunon PF36281BX-000U-S99 (its max RPM is 23000), the
default divisor is not enough (one bit of change equals to about 500
RPM). The only way to change the divisor right now, is to set the
target RPM or min RPM.

There is also the regmap patch, but I've implemented that one mainly
because it made the driver a bit easier to debug.

Václav

st 26. 5. 2021 v 17:40 odesílatel Guenter Roeck <linux@roeck-us.net> napsal:
>
> The following series provides various fixes and improvements for the
> max31790 driver.
>
> ----------------------------------------------------------------
> Guenter Roeck (7):
>       hwmon: (max31790) Fix fan speed reporting for fan7..12
>       hwmon: (max31790) Report correct current pwm duty cycles
>       hwmon: (max31790) Fix pwmX_enable attributes
>       hwmon: (max31790) Add support for fanX_enable attributes
>       hwmon: (max31790) Clear fan fault after reporting it
>       hwmon: (max31790) Detect and report zero fan speed
>       hwmon: (max31790) Add support for fanX_min attributes
>
>  Documentation/hwmon/max31790.rst |  17 +++-
>  drivers/hwmon/max31790.c         | 171 ++++++++++++++++++++++++++++++---------
>  2 files changed, 147 insertions(+), 41 deletions(-)
Guenter Roeck June 1, 2021, 12:08 p.m. UTC | #2
On Tue, Jun 01, 2021 at 10:29:48AM +0200, Václav Kubernát wrote:
> Hello,
> 
[ short reply - I am on the road. I'll look into your replies in
more detail later ]

> I have tested your patches. It seems like the driver is now a lot more
> usable, thanks. What seems to be still unusable for me, is RPM mode.
> The chip creates an effort to set the RPM, but it almost never
> stabilizes. I think the reason is mainly because the driver doesn't
> work with registers like "window" and "pwm rate of change". PWM mode
> seems to work fine.
> 
Agreed; I found the same problem. I actually tried to implement support
for an attribute to support the window registers, but could not find
working settings. I only played with window registers, though, so we'll
probably need attributes for both window mode and pwm rate of change.

> I think some of the patches in my patch series on the chip are now
> obsolete. However, I do think at least fanX_div should be implemented.
> When testing with Sunon PF36281BX-000U-S99 (its max RPM is 23000), the
> default divisor is not enough (one bit of change equals to about 500
> RPM). The only way to change the divisor right now, is to set the
> target RPM or min RPM.
> 
Agreed.

> There is also the regmap patch, but I've implemented that one mainly
> because it made the driver a bit easier to debug.
> 
Only reason for me to omit that was because it was buggy (FWIW, I didn't
know either that the defalt caching mode is "do not cache", and that all
the 'volatile' declarations were useless).

Guenter