Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The thermal subsystem and this driver still feel a little odd, so followups or amendments to this PR are likely.
The emc2305,pwm-max value only clips the max speed that can be set via sysfs (sys/class/hwmon/hwmonX/pwm), not the max state that can be requested by the thermal side.
emc2305,pwm-min does appear to set the minimum state that can be used.
I'm not fully understanding how the thermal subsystem is intending to control a fan such as this where we have 10 states. The PoE HAT fan driver maps specific trip temperatures to specific state values. That works, but feels a little course.
In defining the map as eg
cooling-device = <&emc2301 2 6>;
, once the trip is hit the subsystem is allowed to use states 2 to 6 to cool the device. The second trip then allows states 7 to max (10) once hit. Which state appears to be controlled via a PID loop, but the exact properties for that loop and how it chooses the state seem ill-defined.If anyone has more knowledge on the thermal subsystem and fan control, then I'm open to input.