Skip to content

Commit 59768b2

Browse files
committed
hw-mgmt: thermal: Fix thermal config default parameters apply for swbX_voltmon
On the sensor initialization, TC applies a default configuration based on the sensor name. In this configuration, the name is defined as a regular expression that is matched against the sensor_name. For sensors with names like swb{}_voltmon{}_temp1, the default configuration was not applied due to an incomplete regular expression in the default config. Fix: Change default config regexp to support both voltmon sensor name formats: voltmon{}_temp1 and swb{}_voltmon{}_temp1. r'voltmon\d+_temp' -> r'(swb\d+_)?voltmon\d+_temp' Bug: 4661920 Signed-off-by: Oleksandr Shamray <[email protected]>
1 parent 0edf6df commit 59768b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

usr/usr/bin/hw_management_thermal_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class CONST(object):
282282
r'psu\d+_temp': {"type": "thermal_sensor",
283283
"val_min": 45000, "val_max": 85000, "poll_time": 30, "enable": 0
284284
},
285-
r'voltmon\d+_temp': {"type": "thermal_sensor",
285+
r'(swb\d+_)?voltmon\d+_temp': {"type": "thermal_sensor",
286286
"pwm_min": 30, "pwm_max": 70, "val_min": "!70000", "val_max": "!95000",
287287
"val_lcrit": 0, "val_hcrit": 150000, "poll_time": 3,
288288
"input_suffix": "_input"

usr/usr/bin/hw_management_thermal_control_2_5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class CONST(object):
337337
r'psu\d+_temp': {"type": "thermal_sensor",
338338
"val_min": 45000, "val_max": 85000, "poll_time": 30, "enable": 0
339339
},
340-
r'voltmon\d+_temp': {"type": "thermal_sensor",
340+
r'(swb\d+_)?voltmon\d+_temp': {"type": "thermal_sensor",
341341
"pwm_min": 30, "pwm_max": 70, "val_min": "!70000", "val_max": "!95000",
342342
"val_lcrit": 0, "val_hcrit": 150000, "poll_time": 3,
343343
"input_suffix": "_input"
@@ -364,7 +364,7 @@ class CONST(object):
364364
"pwm_min": 30, "pwm_max": 70, "val_min": "!70000", "val_max": "!95000",
365365
"val_lcrit": 0, "val_hcrit": 150000, "poll_time": 30,
366366
},
367-
r'dpu\\d+_module': {"type": "dpu_module",
367+
r'dpu\d+_module': {"type": "dpu_module",
368368
"pwm_min": 20, "pwm_max": 30, "val_min": "!70000", "val_max": "!95000",
369369
"val_lcrit": 0, "val_hcrit": 150000, "poll_time": 5, "child_sensors_list" : []
370370
},

0 commit comments

Comments
 (0)