Re: [PATCH v3 2/2] thermal: core: introduce thermal zone device mode control
From: Rafael J. Wysocki
Date: Mon Jul 03 2017 - 17:07:43 EST
On Mon, Jul 3, 2017 at 10:00 AM, Enric Balletbo i Serra
> From: Zhang Rui <rui.zhang@xxxxxxxxx>
> Thermal "mode" sysfs attribute is introduced to enable/disable a thermal zone,
> and .get_mode()/.set_mode() callback is introduced for platform thermal driver
> to enable/disable the hardware thermal control logic. And thermal core takes
> no action upon thermal zone enable/disable.
> Actually, this is not quite right because thermal core still pokes those
> disabled thermal zones occasionally, e.g. upon system resume.
> To fix this, a new flag 'mode' is introduced in struct thermal_zone_device
> to represent the thermal zone mode, and several decisions have been made
> based on this flag, including
> 1. check the thermal zone mode right after it's registered.
> 2. skip updating thermal zone if the zone is disabled
> 3. stop the polling timer when the thermal zone is disabled
> Note: basically, this patch doesn't affect the existing always-enabled
> thermal zones much, with just one exception -
> thermal zone .get_mode() must be well prepared to reflect the real thermal
> zone status upon the thermal zone registration.
> Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
> Tested-by: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>
I'm thinking that Rui is going to push this patch himself, in which
case there's no need to resend (and you should add your sign-off to
the patch when resending it anyway).