* [PATCH 0/3] hwmon: arctic_fan_controller: PWM default, dual license, maintainer contact
@ 2026-09-10 5:03 Aureo Serrano de Souza
2026-09-10 5:03 ` [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40% Aureo Serrano de Souza
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aureo Serrano de Souza @ 2026-09-10 5:03 UTC (permalink / raw)
To: linux-hwmon
Cc: linux, linux, arctic.it.hk, corbet, skhan, rdunlap, linux-doc,
linux-kernel, Aureo Serrano de Souza
Follow-up to the ARCTIC Fan Controller driver merged for 7.2.
Patch 1 initializes the PWM cache to the MCU factory default of 40%
(sysfs 102) instead of 0, so a first single-channel write leaves the
other fans running at a safe speed. PWM is still not read from
periodic IN reports.
Patch 2 dual-licenses the driver and doc as GPL-2.0-or-later OR
BSD-2-Clause. Sole in-tree author; copyright ARCTIC.
Patch 3 points MAINTAINERS at arctic.it.hk@arctic.de.
This is a new series, not a v8 of the add-driver patches.
Aureo Serrano de Souza (3):
hwmon: arctic_fan_controller: default PWM cache to MCU 40%
hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR
BSD-2-Clause
hwmon: arctic_fan_controller: use shared maintainer address
Documentation/hwmon/arctic_fan_controller.rst | 28 +++++++++----------
MAINTAINERS | 2 +-
drivers/hwmon/arctic_fan_controller.c | 22 +++++++++------
3 files changed, 27 insertions(+), 25 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40%
2026-09-10 5:03 [PATCH 0/3] hwmon: arctic_fan_controller: PWM default, dual license, maintainer contact Aureo Serrano de Souza
@ 2026-09-10 5:03 ` Aureo Serrano de Souza
2026-09-11 0:55 ` Guenter Roeck
2026-09-10 5:04 ` [PATCH 2/3] hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR BSD-2-Clause Aureo Serrano de Souza
2026-09-10 5:04 ` [PATCH 3/3] hwmon: arctic_fan_controller: use shared maintainer address Aureo Serrano de Souza
2 siblings, 1 reply; 7+ messages in thread
From: Aureo Serrano de Souza @ 2026-09-10 5:03 UTC (permalink / raw)
To: linux-hwmon
Cc: linux, linux, arctic.it.hk, corbet, skhan, rdunlap, linux-doc,
linux-kernel, Aureo Serrano de Souza
The device has no GET_REPORT and every OUT report carries all 10
channels, so the cache has to start at some value. Starting at 0
means the first sysfs write to a single channel also sends 0% on
the other nine.
The MCU factory default is 40%. Initialize pwm_duty[] to 102 (40%
on the 0-255 sysfs scale) at probe and on reset-resume. Any initial
cache can be stale if the module is reloaded without a device
reset. 40% matches the hardware after power-on or power-loss
resume, and a first single-channel write leaves the fans running
at a safe speed.
PWM is still not taken from periodic IN reports: the device is
manual-only and the host cache stays authoritative after the first
successful write.
Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de>
---
Documentation/hwmon/arctic_fan_controller.rst | 26 +++++++++----------
drivers/hwmon/arctic_fan_controller.c | 18 ++++++++-----
2 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/Documentation/hwmon/arctic_fan_controller.rst b/Documentation/hwmon/arctic_fan_controller.rst
index b5be88ae464..200e51932a1 100644
--- a/Documentation/hwmon/arctic_fan_controller.rst
+++ b/Documentation/hwmon/arctic_fan_controller.rst
@@ -29,18 +29,16 @@ Usage notes
Since it is a USB device, hotplug is supported. The device is autodetected.
The device does not support GET_REPORT, so the driver cannot read back the
-current hardware PWM state at probe time. The cached PWM values (readable
-via pwm[1-10]) start at 0 and reflect only values that have been
-successfully written. Because each OUT report carries all 10 channel values,
-writing a single channel also sends the cached values for all other channels.
-Users should set all channels to the desired values before relying on the
-cached state.
-
-On system suspend, the device may lose power and reset its PWM channels to
-hardware defaults. The driver clears its cached duty values on resume so
-that reads reflect the unknown hardware state rather than stale pre-suspend
-values. Userspace is responsible for re-applying the desired duty cycles
-after resume.
+current hardware PWM state at probe time. Each OUT report carries all 10
+channels, so pwm[1-10] is a host cache. It starts at the MCU factory
+default of 40% (sysfs 102). After a successful write, the cache reflects
+that value. Users should set all channels to the desired values before
+relying on the cached state.
+
+On system suspend, the device may lose power and reset PWM to the factory
+default. The driver restores the cache to 40% on resume. If the device
+kept power across suspend, userspace should re-apply the desired duty
+cycles.
Sysfs entries
-------------
@@ -51,6 +49,6 @@ pwm[1-10] PWM duty cycle (0-255). Write: sends an OUT report setting the
duty cycle (scaled from 0-255 to 0-100% for the device);
the cached value is updated only after the device ACKs the
command with a success status. Read: returns the last
- successfully written value; initialized to 0 at driver load
- and after resume (hardware state unknown).
+ successfully written value; initialized to 102 (40%) at
+ driver load and after resume (MCU factory default).
================ ==============================================================
diff --git a/drivers/hwmon/arctic_fan_controller.c b/drivers/hwmon/arctic_fan_controller.c
index dbe84cd93c0..9a609257273 100644
--- a/drivers/hwmon/arctic_fan_controller.c
+++ b/drivers/hwmon/arctic_fan_controller.c
@@ -35,6 +35,8 @@
* Measured over 500 iterations: max ~563 ms. Keep 1 s as margin.
*/
#define ARCTIC_ACK_TIMEOUT_MS 1000
+/* MCU factory default; 40% of 0-255 is 102. */
+#define ARCTIC_PWM_DEFAULT 102
struct arctic_fan_data {
struct hid_device *hdev;
@@ -164,7 +166,7 @@ static int arctic_fan_write(struct device *dev, enum hwmon_sensor_types type,
/*
* Build the buffer and arm write_pending under in_report_lock so that
- * reset_resume() cannot clear pwm_duty[] between the pwm_duty[] read
+ * reset_resume() cannot replace pwm_duty[] between the pwm_duty[] read
* and the buffer write, and raw_event() cannot deliver a stale ACK
* from a previous write into this write's completion.
*
@@ -256,14 +258,14 @@ static int arctic_fan_reset_resume(struct hid_device *hdev)
unsigned long flags;
/*
- * The device resets its PWM channels to hardware defaults on power
- * loss during suspend. Clear the cached duty values so they reflect
- * the unknown hardware state, consistent with probe-time behaviour
- * (the device has no GET_REPORT support). Hold in_report_lock so
- * this does not race with a concurrent pwm read or write callback.
+ * The device resets its PWM channels to the MCU factory default
+ * (40%) on power loss during suspend. Restore the cache to that
+ * same default, consistent with probe-time behaviour (the device
+ * has no GET_REPORT support). Hold in_report_lock so this does
+ * not race with a concurrent pwm read or write callback.
*/
spin_lock_irqsave(&priv->in_report_lock, flags);
- memset(priv->pwm_duty, 0, sizeof(priv->pwm_duty));
+ memset(priv->pwm_duty, ARCTIC_PWM_DEFAULT, sizeof(priv->pwm_duty));
spin_unlock_irqrestore(&priv->in_report_lock, flags);
return 0;
}
@@ -288,6 +290,8 @@ static int arctic_fan_probe(struct hid_device *hdev,
priv->hdev = hdev;
spin_lock_init(&priv->in_report_lock);
init_completion(&priv->in_report_received);
+ /* Same MCU factory default as reset_resume(); see ARCTIC_PWM_DEFAULT above. */
+ memset(priv->pwm_duty, ARCTIC_PWM_DEFAULT, sizeof(priv->pwm_duty));
hid_set_drvdata(hdev, priv);
ret = hid_hw_start(hdev, HID_CONNECT_DRIVER);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR BSD-2-Clause
2026-09-10 5:03 [PATCH 0/3] hwmon: arctic_fan_controller: PWM default, dual license, maintainer contact Aureo Serrano de Souza
2026-09-10 5:03 ` [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40% Aureo Serrano de Souza
@ 2026-09-10 5:04 ` Aureo Serrano de Souza
2026-09-11 0:56 ` Guenter Roeck
2026-09-10 5:04 ` [PATCH 3/3] hwmon: arctic_fan_controller: use shared maintainer address Aureo Serrano de Souza
2 siblings, 1 reply; 7+ messages in thread
From: Aureo Serrano de Souza @ 2026-09-10 5:04 UTC (permalink / raw)
To: linux-hwmon
Cc: linux, linux, arctic.it.hk, corbet, skhan, rdunlap, linux-doc,
linux-kernel, Aureo Serrano de Souza
The in-tree driver is solely authored by ARCTIC. Keep the existing
GPL-2.0-or-later grant and add BSD-2-Clause so the files may be used
under either license.
Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de>
---
Documentation/hwmon/arctic_fan_controller.rst | 2 +-
drivers/hwmon/arctic_fan_controller.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/hwmon/arctic_fan_controller.rst b/Documentation/hwmon/arctic_fan_controller.rst
index 200e51932a1..60ac09a9cea 100644
--- a/Documentation/hwmon/arctic_fan_controller.rst
+++ b/Documentation/hwmon/arctic_fan_controller.rst
@@ -1,4 +1,4 @@
-.. SPDX-License-Identifier: GPL-2.0-or-later
+.. SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
Kernel driver arctic_fan_controller
=====================================
diff --git a/drivers/hwmon/arctic_fan_controller.c b/drivers/hwmon/arctic_fan_controller.c
index 9a609257273..9eb83a149cd 100644
--- a/drivers/hwmon/arctic_fan_controller.c
+++ b/drivers/hwmon/arctic_fan_controller.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
+// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
/*
* Linux hwmon driver for ARCTIC Fan Controller
*
@@ -375,4 +375,4 @@ module_hid_driver(arctic_fan_driver);
MODULE_AUTHOR("Aureo Serrano de Souza <aureo.serrano@arctic.de>");
MODULE_DESCRIPTION("HID hwmon driver for ARCTIC Fan Controller");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("Dual BSD/GPL");
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] hwmon: arctic_fan_controller: use shared maintainer address
2026-09-10 5:03 [PATCH 0/3] hwmon: arctic_fan_controller: PWM default, dual license, maintainer contact Aureo Serrano de Souza
2026-09-10 5:03 ` [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40% Aureo Serrano de Souza
2026-09-10 5:04 ` [PATCH 2/3] hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR BSD-2-Clause Aureo Serrano de Souza
@ 2026-09-10 5:04 ` Aureo Serrano de Souza
2026-09-11 0:57 ` Guenter Roeck
2 siblings, 1 reply; 7+ messages in thread
From: Aureo Serrano de Souza @ 2026-09-10 5:04 UTC (permalink / raw)
To: linux-hwmon
Cc: linux, linux, arctic.it.hk, corbet, skhan, rdunlap, linux-doc,
linux-kernel, Aureo Serrano de Souza
Route driver maintenance mail to the shared ARCTIC (HK) alias instead
of a personal mailbox.
Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 2c1d85ad307..90cdd80704c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2177,7 +2177,7 @@ F: drivers/net/arcnet/
F: include/uapi/linux/if_arcnet.h
ARCTIC FAN CONTROLLER DRIVER
-M: Aureo Serrano de Souza <aureo.serrano@arctic.de>
+M: ARCTIC (HK) <arctic.it.hk@arctic.de>
L: linux-hwmon@vger.kernel.org
S: Maintained
F: Documentation/hwmon/arctic_fan_controller.rst
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40%
2026-09-10 5:03 ` [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40% Aureo Serrano de Souza
@ 2026-09-11 0:55 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2026-09-11 0:55 UTC (permalink / raw)
To: Aureo Serrano de Souza
Cc: linux-hwmon, linux, arctic.it.hk, corbet, skhan, rdunlap,
linux-doc, linux-kernel
On Thu, Sep 10, 2026 at 01:03:59PM +0800, Aureo Serrano de Souza wrote:
> The device has no GET_REPORT and every OUT report carries all 10
> channels, so the cache has to start at some value. Starting at 0
> means the first sysfs write to a single channel also sends 0% on
> the other nine.
>
> The MCU factory default is 40%. Initialize pwm_duty[] to 102 (40%
> on the 0-255 sysfs scale) at probe and on reset-resume. Any initial
> cache can be stale if the module is reloaded without a device
> reset. 40% matches the hardware after power-on or power-loss
> resume, and a first single-channel write leaves the fans running
> at a safe speed.
>
> PWM is still not taken from periodic IN reports: the device is
> manual-only and the host cache stays authoritative after the first
> successful write.
>
> Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR BSD-2-Clause
2026-09-10 5:04 ` [PATCH 2/3] hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR BSD-2-Clause Aureo Serrano de Souza
@ 2026-09-11 0:56 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2026-09-11 0:56 UTC (permalink / raw)
To: Aureo Serrano de Souza
Cc: linux-hwmon, linux, arctic.it.hk, corbet, skhan, rdunlap,
linux-doc, linux-kernel
On Thu, Sep 10, 2026 at 01:04:00PM +0800, Aureo Serrano de Souza wrote:
> The in-tree driver is solely authored by ARCTIC. Keep the existing
> GPL-2.0-or-later grant and add BSD-2-Clause so the files may be used
> under either license.
>
> Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] hwmon: arctic_fan_controller: use shared maintainer address
2026-09-10 5:04 ` [PATCH 3/3] hwmon: arctic_fan_controller: use shared maintainer address Aureo Serrano de Souza
@ 2026-09-11 0:57 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2026-09-11 0:57 UTC (permalink / raw)
To: Aureo Serrano de Souza
Cc: linux-hwmon, linux, arctic.it.hk, corbet, skhan, rdunlap,
linux-doc, linux-kernel
On Thu, Sep 10, 2026 at 01:04:01PM +0800, Aureo Serrano de Souza wrote:
> Route driver maintenance mail to the shared ARCTIC (HK) alias instead
> of a personal mailbox.
>
> Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-11 0:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 5:03 [PATCH 0/3] hwmon: arctic_fan_controller: PWM default, dual license, maintainer contact Aureo Serrano de Souza
2026-09-10 5:03 ` [PATCH 1/3] hwmon: arctic_fan_controller: default PWM cache to MCU 40% Aureo Serrano de Souza
2026-09-11 0:55 ` Guenter Roeck
2026-09-10 5:04 ` [PATCH 2/3] hwmon: arctic_fan_controller: dual-license GPL-2.0-or-later OR BSD-2-Clause Aureo Serrano de Souza
2026-09-11 0:56 ` Guenter Roeck
2026-09-10 5:04 ` [PATCH 3/3] hwmon: arctic_fan_controller: use shared maintainer address Aureo Serrano de Souza
2026-09-11 0:57 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).