Re: [RFC PATCH v7] platform/x86: panasonic-laptop: add fan speed mode for newer models
From: Alex Yeo
Date: Tue Jul 28 2026 - 22:12:58 EST
On 2026/07/22 8:00 AM, Guenter Roeck wrote:
I for my part would like to understand why hwmon_lock() / hwmon_unlock()
(or the hwmon_lock guard) are not sufficient. You suggest above that they
are not sufficient and that you need the additional pwm_fan_lock, but you
don't really explain the reason. You do explain that you need to lock the
thermal access functions, and I agree, but you do not explain why the hwmon
subsystem lock functions can not be used. It would be important to
understand why that is the case because those functions exist for exactly
that purpose. If they are insufficient, it is important to understand why
that is the case.
Thanks,
Guenter
I have reworked the code to use hwmon_lock() via guard. I have tested the code on my machine and it works as expected. As a result, hwmon is now the primary owner of the fan.
I will submit a v8 patch with more details.
Thanks