control: Modify target_from_group_max algorithm

This patch simplifies the algorithm of target_from_group_max action
and only updates fan speed according to the table when the sensor
value reaches the threshold value in the table. Moreover, this will
always update the zone's target every action run, no matter whether
the group's value has changed or not. This is to support other
trigger event (e.g timer-based) and make sure that the zone always
run at the desired speed (when group's value has not changed but
the zone target has been modified by other actions).

Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Change-Id: If412e5a6e8bcd3080175c49088a07b1b41528ffc
1 file changed