mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Tomasz Bojanowski <tomasz@bojanowski.me>
Cc: linux-hwmon@vger.kernel.org,
	Hamza Mahfooz <someguy@effective-light.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (nct6683) Return -EBUSY if a fan curve is no longer supported
Date: Sun, 29 Nov 2026 10:25:38 -0800	[thread overview]
Message-ID: <ac259755-67e6-445b-9336-19b082bbcf12@roeck-us.net> (raw)
In-Reply-To: <20261129174305.813063-1-tomasz@bojanowski.me>

On Sun, Nov 29, 2026 at 06:43:05PM +0100, Tomasz Bojanowski wrote:
> Before writing a point of a fan curve, the driver checks that it still
> supports the curve which is set in the EC. If it does not, nothing is
> written, so this is not an I/O error. Return -EBUSY instead of -EIO.
> 
> Writing pwmN_auto_channels_temp already returns -EBUSY if its check of the
> current temperature source fails.
> 
> -EIO is still returned if the EC does not take the new curve. Document
> both, and that the check includes whether the curve sets a duty cycle.
> 
> Compile tested.
> 
> Signed-off-by: Tomasz Bojanowski <tomasz@bojanowski.me>

Applied.

On a side note, I tested the recent changes on boards with
NCT6683_CUSTOMER_ID_MSI3 (MAG B650M MORTAR WIFI (MS-7D76) and MAG B650
TOMAHAWK WIFI (MS-7D75)). This is what I get on the Tomahawk board:

pwm1:87
pwm1_auto_channels_temp:1
pwm1_auto_point1_pwm:51
pwm1_auto_point1_temp:0
pwm1_auto_point2_pwm:89
pwm1_auto_point2_temp:45000
pwm1_auto_point3_pwm:178
pwm1_auto_point3_temp:65000
pwm1_auto_point4_pwm:255
pwm1_auto_point4_temp:80000
pwm1_auto_point5_pwm:255
pwm1_auto_point5_temp:80000
pwm1_auto_point6_pwm:255
pwm1_auto_point6_temp:80000
pwm1_auto_point7_pwm:255
pwm1_auto_point7_temp:80000
pwm1_enable:2
pwm1_step_down_time:100
pwm1_step_up_time:100
pwm2:255
pwm2_auto_channels_temp:1
pwm2_auto_point1_pwm:255
pwm2_auto_point1_temp:32000
pwm2_auto_point2_pwm:255
pwm2_auto_point2_temp:32000
pwm2_auto_point3_pwm:255
pwm2_auto_point3_temp:32000
pwm2_auto_point4_pwm:255
pwm2_auto_point4_temp:32000
pwm2_auto_point5_pwm:255
pwm2_auto_point5_temp:32000
pwm2_auto_point6_pwm:255
pwm2_auto_point6_temp:32000
pwm2_auto_point7_pwm:255
pwm2_auto_point7_temp:32000
pwm2_enable:2
pwm2_step_down_time:100
pwm2_step_up_time:100
pwm3:87
pwm4:153
pwm5:79
pwm6:153
pwm7:153
pwm8:97

and:

fan10_input:0
fan10_min:0
fan10_pulses:2
fan1_input:825
fan1_min:0
fan1_pulses:2
fan2_input:0
fan2_min:0
fan2_pulses:2
fan3_input:775
fan3_min:0
fan3_pulses:2
fan4_input:0
fan4_min:0
fan4_pulses:2
fan5_input:707
fan5_min:0
fan5_pulses:2
fan6_input:0
fan6_min:0
fan6_pulses:2
fan7_input:0
fan7_min:0
fan7_pulses:2
fan8_input:598
fan8_min:0
fan8_pulses:2
fan9_input:0
fan9_min:0
fan9_pulses:2

On the Mortar board a fan is connected to pwm2/fan2, so the data for that
channel works as expected.

pwm control is enabled on all fans. I don't know if that means that pwm3+
have a different register set. Either case, I figured that it would be too
risky to enable pwm control for these boards; I just wanted to let you
know.

Thanks,
Guenter

      reply	other threads:[~2026-11-29 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 17:43 Tomasz Bojanowski
2026-11-29 18:25 ` Guenter Roeck [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=ac259755-67e6-445b-9336-19b082bbcf12@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=someguy@effective-light.com \
    --cc=tomasz@bojanowski.me \
    /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

all inboxes | Powered by JetHome®