of: thermal: Allow multiple devices to share cooling map
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 8 Aug 2018 07:08:14 +0000 (12:38 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 24 Aug 2018 23:14:31 +0000 (16:14 -0700)
commita92bab8919e3fb0dfb58e79d9a452507b389fd77
tree3bfd75a5b85aad9b2be84529116694297d25613a
parentf1599f9e4cd6f1dd0cad202853fb830854f4e944
of: thermal: Allow multiple devices to share cooling map

A cooling map entry may now contain a list of phandles and their
arguments representing multiple devices which share the trip point.

This patch updates the thermal OF core to parse them properly. The trip
point and contribution value is shared by multiple cooling devices now
and so a new structure is created, struct __thermal_cooling_bind_param,
which represents a cooling device and its min/max states and the
existing struct __thermal_bind_params now contains an array of this new
cooling device structure.

Tested on Hikey960.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/of-thermal.c