Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guenter Roeck" <linux@roeck-us.net>, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (asus_rog_ryujin) Update cached duty cycle after cooler PWM write
Date: Thu, 05 Nov 2026 04:54:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-198570@kernel.org> (raw)
In-Reply-To: <20261105044843.3262037-1-linux@roeck-us.net>

> In rog_ryujin_write_fixed_duty(), writing a PWM duty cycle to channel 0
> (pump) or channel 1 (internal fan) returns directly from
> rog_ryujin_write_cooler_duty(), skipping the priv->duty_input[channel]
> update at the end of the function. Because the function first fetches
> the pre-write cooler duty via get_cooler_duty_cmd and SET confirmation
> reports do not update priv->duty_input, subsequent sysfs reads within
> the STATUS_VALIDITY (1500 ms) cache window return stale duty values (or,
> on Ryujin III when switching pump source at the reported duty, the
> temporary neighbouring duty written by rog_ryujin_select_pump_source()).
> 
> Furthermore, rog_ryujin_write_fixed_duty() overwrote val in place with
> rog_ryujin_pwm_to_percent(val), so even before the early return was
> introduced, priv->duty_input[channel] stored a 0-100 percentage rather
> than the 0-255 PWM value expected by rog_ryujin_read().
> 
> Keep the 0-100 percentage in a separate local variable and fall through
> on success so priv->duty_input[channel] caches the written 0-255 PWM
> value until the next status refresh.
> 
> Fixes: ed3e03790c5c ("hwmon: Add driver for ASUS ROG RYUJIN II 360 AIO cooler")
> Fixes: b4306c0c8e24 ("hwmon: (asus_rog_ryujin) Rely on subsystem locking")
> Cc: Aleksa Savic <savicaleksa83@gmail.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261105044843.3262037-1-linux@roeck-us.net?part=1


      reply	other threads:[~2026-11-05  4:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  4:48 [PATCH] hwmon: (asus_rog_ryujin) Update cached duty cycle after cooler PWM write Guenter Roeck
2026-11-05  4:54 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-198570@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox