On δΊ”, 2012-09-21 at 14:57 +0800, zhanghongbo wrote:
From: "hongbo.zhang" hongbo.zhang@linaro.com
This patch set contains two patches.
[PATCH 1/2] A new interface is introduced to deactive all the referenced cooling devices when thermal zone is disabled.
we can not deactive a cooling device directly. we should deactive all the thermal_instances for this thermal zone. because a cooling device may be referenced in multiple thermal zones.
Because the cooling device list is maintained in the generic thermal layer, the thermal driver cannot walk through the list and cannot deactive its cooling devices either. This interface is needed in the .set_mode callback when the thermal zone mode is set to "disabled".
Durga is introducing the cooling policy for the generic thermal layer and one of them is "userspace". if we set the policy to userspace, the generic thermal layer will do nothing but getting input from userspace. if we have an API to change the cooling policy for a thermal zone, can this be used instead?
[PATCH 2/2] When a cooling device is unbound it should be deactived, otherwise cooling device will keep active after unbinding, this isn't what we expect.
as I said, it should delete the thermal_instance and then update the cooling device.
thanks, rui