On 21 September 2012 15:21, Zhang Rui rui.zhang@intel.com wrote:
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.
Understand.
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?
The reason I sent out these patches is that I found out deactivation of cooling devices is necessary, and I didn't see any update of thermal framework recently. Since you are still working on this framework, can you consider this deactivation function in your next version? or need I resend again? I think it is better you do it.
Another propose is that let the thermal driver walk through its cooling device list is also important I think, if "userspace" mode is introduced, the thermal driver needs to manipulate its cooling device, the thermal driver cannot do this without knowing its cooling devices list. (one method to achieve this is as my last patch several weeks ago)
Another question, when will you update your framework, v3.7? Thanks.
[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.
Understand.
thanks, rui