lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6ed0eb0c-c31b-41b0-93ca-c6581249c7b7@linaro.org>
Date: Thu, 9 Jan 2025 22:36:07 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Werner Sembach <wse@...edocomputers.com>,
 "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
 "Rafael J . Wysocki" <rafael@...nel.org>
Cc: rui.zhang@...el.com, Hans de Goede <hdegoede@...hat.com>,
 Armin Wolf <W_Armin@....de>, Ilpo Järvinen
 <ilpo.jarvinen@...ux.intel.com>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 platform-driver-x86@...r.kernel.org
Subject: Re: Thermal driver with safeguards

On 02/12/2024 15:52, Werner Sembach wrote:
> Hi,
> 
> given a pair of a temperature sensor and a fan, I want to implement a 
> driver. that allows userspace to directly control the fan if it wants 
> to. But have a minimum fan speed when certain high temperatures are 
> reached to avoid crashes or hardware damage.

 From the userspace, use directly the thermal-engine which is currently 
under development [1]. You can add your platform specific code in a 
plugin while the thermal engine will catch all the thermal events and 
pass them to it [2].

The thermal engine has a configuration file which will setup the thermal 
framework to be woken up at different temperatures.

The thermal engine will be proposed for a distro package, so the 
platform support will be automatically supported.

Beside the trip points can be setup in the device to act on higher 
temperature.

What is unclear is how the fan is managed. I suggest to have a look at 
pwm-fan.c in drivers/hwmon

> e.g.
> 
> - temperature of target die is 80°C -> fan speed must be at least 30%
> 
> - temperature of target die is 90°C -> fan speed must be at least 40%
> 
> - temperature of target die is 105°C -> fan speed must be 100%
> 
> - temperature of target die is 110°C -> device shuts off to protect the 
> hardware
> 
> Would the thermal subsystem be the right place for this to implement 
> this protection in driver?
> 
> It already has functions around periodic temperature polling and trip 
> points.

[1] https://github.com/Linaro/libpm/tree/master
[2] 
https://github.com/Linaro/libpm/blob/master/thermal-engine/plugins/te-plugin-example-game.c


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ