Re: [PATCH v2 2/2] hwmon: (asus_rog_ryujin) Add pwm1_enable for the Ryujin III pump

From: Guenter Roeck

Date: Mon Oct 26 2026 - 16:53:51 EST


On Mon, Sep 28, 2026 at 07:41:06AM -0400, Zac Lanzon wrote:
> Once pwm1 has been written, nothing in the driver hands the RYUJIN III
> pump back to its internal controller, and user space cannot tell which
> source controls the pump.
>
> Expose the pump control source as pwm1_enable, read from the cooler
> duty report: 1 when the pump follows pwm1, 2 when it is handed to its
> internal controller, which follows the PWM of the header its 4-pin
> cable is plugged into. Writing 2 sends the reported duties with source
> 0, and writing 1 sends them with source 1, with the same neighbouring
> duty write as pwm1. Other values return -EINVAL. Writing pwm1 still
> selects source 1. The attribute is not created for the RYUJIN II.
>
> With changes in both directions, source changes can follow each other
> closely. The cooler ignored a source change sent 500 ms or less after
> the previous one (7 of 7 trials) and applied one sent 1 s or more after
> it (5 of 5). Its duty report showed a change within 1.1 s of the
> command in every trial. So a write that changes the source now waits
> until 1 s has passed since the previous change, then polls the duty
> report every 100 ms until it shows the new source, and fails with
> -ETIMEDOUT after 2 s. pump_source is only taken from the report. Other
> writes are unaffected.
>
> Measured on a RYUJIN III 360 (firmware AURJ2-S750-0108) with the pump
> cable on AIO_PUMP and the header PWM set through nct6775 (pump rpm):
>
> header 50% header 80% pwm1_enable
> driver loaded, internal controller 2160 3090 2
> pwm1 = 40% 1725 1740 1
> pwm1_enable = 2 2130 3090 2
> pwm1_enable = 1 1740 1740 1
> pwm1_enable = 2, then pwm1 = 60% 2475 1
> driver reloaded, pump on USB 1740 1740 1
>
> Written back to back, each source change took 0.95 to 1.07 s, and the
> sequences ended as requested in 2 of 2 runs each: pwm1_enable = 2 then
> pwm1 = 60% with the pump at 60% on USB, pwm1_enable = 1, 2, 1 on USB,
> and pwm1 = 60% then pwm1_enable = 2 on the internal controller.
>
> From power-on (measured with v1 of this patch; v2 changes only how the
> wait is computed, and the first source change after loading never
> waits), with the header at 100%, pwm1_enable read 2, read 1 after
> pwm1 = 40% (pump at 1710 rpm), and writing 2 handed the pump back to
> its internal controller (3585 rpm).
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Zac Lanzon <lanzonza@xxxxxxxxx>

Applied.

Thanks,
Guenter