Skip to contentSkip to conversation

hwmon: (max31790) Add support for fanX_div

PATCH In review Václav Kubernát 2 participants 2 messages Jun 3, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (max31790) Add support for fanX_div

Right now, the divisor (which determines the speed range) can be only set by setting fanX_min or fanX_target. This is fine for RPM mode, but in other cases, it might not be enough. This patch makes it possible to set the divisor independently.

---
 Documentation/hwmon/max31790.rst |  4 ++
 drivers/hwmon/max31790.c         | 68 ++++++++++++++++++++++++++------
 2 files changed, 60 insertions(+), 12 deletions(-)
Documentation/hwmon/max31790.rst +4 -0
index 9225c2a78b68..818e4fe8c797 100644
@@ -50,6 +50,10 @@ fan[1-12]_min      RW  minimum fan speed in RPM. Equivalent to target fan speed
                        and the chip will report a fault condition if the fan
                        speed is below the target fan speed.
 fan[1-6]_target    RW  desired fan speed in RPM
+fan[1-12]_div      RW  fan speed range
+		       The value is RO for companion channels (7-12). For those
+		       channels, the value matches the value of the primary channel.
+		       Setting fanX_target or fanX_min also sets this value.
 pwm[1-6]_enable    RW  regulator mode, 0=disabled (duty cycle=0%), 1=manual mode, 2=rpm mode
 pwm[1-6]           RW  read: current pwm duty cycle,
                        write: target pwm duty cycle (0-255)
drivers/hwmon/max31790.c +56 -12

103 lines not on this page · raw message

Signature · 1 line
2.31.1
maintainer
#1 lore raw
Quoted 5 lines · Václav Kubernát

Right now, the divisor (which determines the speed range) can be only set by setting fanX_min or fanX_target. This is fine for RPM mode, but in other cases, it might not be enough. This patch makes it possible to set the divisor independently.

Jan objected to patch 4/7 of the previous series, so anything from that onward is a no-go at this time. I'll drop patches 4/7 to 7/7 from the series for now. I will only be able to look into this further in about a month.

Guenter