Re: Thermal driver with safeguards

From: Pavel Machek
Date: Mon Jan 13 2025 - 17:19:01 EST


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.
> >
> > 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?

Best place to implement this would be hardware... It should
self-protect.

Next best place is embedded controller.

Yes, kernel can probably do that, too, but then you risk running "hot"
when kernel panics, when someone boots 2.16 kernel, or DOS or ...

Best regards,

Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.

Attachment: signature.asc
Description: PGP signature