Re: [PATCH v2 2/2] thermal: core: Allow to disable polling when disabling thermal zone.

From: Zhang Rui
Date: Fri Jun 30 2017 - 01:05:16 EST


On Thu, 2017-06-29 at 18:50 +0200, Enric Balletbo i Serra wrote:
> Under each thermal zone there is a optional file called "mode".
> Writing
> enabled or disabled to this file allows a given thermal zone to be
> enabled
> or disabled, but in current code, the monitoring queue doesn't stops.
> Add
> the code to disable polling when disabling thermal zone and enable
> polling
> when enabling the thermal zone.
>
> This patch is based on the original Sameer Nanda <snanda@xxxxxxxxxxxx
> >
> patch that implemented this idea for the ACPI thermal driver.
>

Before these two patches, only platform thermal driver cares about
"mode", thermal core does nothing but invokes platform .set_mode()
callback upon sysfs I/F write.
But after this patch set, "mode" becomes something that we should
take into account in thermal core as well.
Thus, IMO, we have a couple of things more to do, like the prototype
patch attached, which I have not tested yet.