Skip to content

Commit dc34b03

Browse files
ramshell68DhineshCool
authored andcommitted
thermal: Skip thermal sensor update if emul temp set
Bug: 129787335 test: verified thermal-engine throttling by emul temp Change-Id: I3b687c9205387df2365e41af51fbbaf107c47f56 Signed-off-by: TeYuan Wang <kamewang@google.com> Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
1 parent a72e13a commit dc34b03

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/thermal/of-thermal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,11 @@ static void handle_thermal_trip(struct thermal_zone_device *tz,
657657
struct list_head *head;
658658
bool notify = false;
659659

660+
// skip to update sensor temperature if emul temp set
661+
if (IS_ENABLED(CONFIG_THERMAL_EMULATION) && tz->emul_temperature) {
662+
return;
663+
}
664+
660665
head = &data->senps->first_tz;
661666
list_for_each_entry(data, head, list) {
662667
zone = data->tzd;

0 commit comments

Comments
 (0)