-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drivers/thermal: Fix hysteresis takes no effect error #15339
Drivers/thermal: Fix hysteresis takes no effect error #15339
Conversation
Coverting to including sim:nsh. Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Signed-off-by: wangjianyu3 <[email protected]>
Log z:cpu-thermal t:50 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:47 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:52 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:49 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:54 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:51 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:56 t:1 h:16 l:0 c:fan0 s:0|(invalid) Signed-off-by: wangjianyu3 <[email protected]>
Diff - z:cpu-thermal t:48 t:1 h:16 l:0 c:fan0 s:0|4294967295 + z:cpu-thermal t:48 t:1 h:16 l:0 c:fan0 s:0|(invalid) The invalid value 4294967295(THERMAL_NO_TARGET, defined as UINT_MAX(0xffffffff)) may bother users. Signed-off-by: wangjianyu3 <[email protected]>
Make it easier to debug. e.g. execute some commands frequently, like: cat /proc/thermal/cpu-thermal Signed-off-by: wangjianyu3 <[email protected]>
Test command nsh> cat /proc/thermal/cpu-thermal Trips /* Copy from drivers/thermal/thermal_dummy.c */ {.name = "cpu_crit", .temp = 90, .hyst = 5, .type = THERMAL_CRITICAL}, {.name = "cpu_alert1", .temp = 70, .hyst = 5, .type = THERMAL_HOT}, {.name = "cpu_alert0", .temp = 60, .hyst = 5, .type = THERMAL_NORMAL}, Without this patch # Error occured when temperature jump to 69. z:cpu-thermal t:67 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:72 t:1 h:16 l:0 c:fan0 s:1|1 z:cpu-thermal t:69 t:1 h:16 l:0 c:fan0 s:0|0 z:cpu-thermal t:74 t:1 h:16 l:0 c:fan0 s:1|1 With this patch z:cpu-thermal t:67 t:1 h:16 l:0 c:fan0 s:0|(invalid) z:cpu-thermal t:72 t:1 h:16 l:0 c:fan0 s:1|1 z:cpu-thermal t:69 t:1 h:16 l:0 c:fan0 s:1|1 z:cpu-thermal t:74 t:1 h:16 l:0 c:fan0 s:2|2 Signed-off-by: wangjianyu3 <[email protected]>
[Experimental Bot, please feedback here] This PR summary is a good start, but could be improved to better meet the NuttX requirements. Here's a revised version: SummaryThis PR improves the simulated thermal driver (
No related NuttX issues or NuttX Apps issues/PRs are directly associated with this change, though it potentially resolves latent bugs. Impact
TestingI confirm that changes are verified on local setup and works as intended:
Testing logs before change:
Testing logs after change:
Key improvements in this version:
By providing more context and detail, this revised PR description makes it easier for reviewers to understand and evaluate the changes. Remember to replace the placeholder text with your actual build host information and testing logs. |
Summary
sim:thermal
.UINT_MAX
directly.sim:thermal
, make it eaiser to input repeat commands.Details can be found in commit message if need.
Impact
drivers/thermal
Testing