pass: thermal: Fix bug of interval update until changed first thermal scenario 86/224286/3
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 7 Feb 2020 08:13:29 +0000 (17:13 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 10 Feb 2020 09:21:41 +0000 (18:21 +0900)
commit41ff8d0860d3e3f0d6363b179d3f6bf50e961a96
tree9af24864d525287636540958cffc268d69ef539c
parent01aa7a772367b6d8385108566592753d187ad33b
pass: thermal: Fix bug of interval update until changed first thermal scenario

The commit 6e9640753a86 ("thermal: Support dbus activation for thermal f/w")
read the temperature and then updated the system early thermal scenario
on thermal_get_scenario() function. When updated the thermal scenario,
have to update the timer interval ('timer_interval_ms' property)
if each thernmal scenaior defines their own timer interval
in configuration file.

But, thermal_get_scenario() has missed the interval update for thermal
monitoring when detecting the ealy thermal scenario on initialization step.
Because each thermal scenario is able to have their own timer interval
('timer_interval_ms' property) for adjusting the timer interval of monitoring.

[Example how to define the thermal scenario information for each h/w resource]
[thermal.scenario1]
support=no
name=Warning
temperature=65
timer_interval_ms=2000

So that in order to fix this bug, update the timer interval of monitoring
when changing the thermal scenario information.

Change-Id: Ib909539ffac357d7a804f726ae43e61a7a044d60
Fixes: 6e9640753a86 ("thermal: Support dbus activation for thermal f/w")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-thermal.c