On 06/25/2015 07:50 AM, Keerthy wrote:
> Currently mode is still disabled even after the cooling device is bound
> to the appropriate device. Hence changing the mode to enabled as soon as
> the cooling device is registered successfully.
> 
> Signed-off-by: Keerthy <[email protected]>
> ---
>  drivers/thermal/of-thermal.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> index 04b1be7..bc84485 100644
> --- a/drivers/thermal/of-thermal.c
> +++ b/drivers/thermal/of-thermal.c
> @@ -163,6 +163,9 @@ static int of_thermal_bind(struct thermal_zone_device 
> *thermal,
>               }
>       }
>  
> +     /* Now that cooling device is bound enable the thermal device*/
> +     data->mode = THERMAL_DEVICE_ENABLED;
> +
>       return 0;
>  }
>  
> 
This makes sense to me rather than waiting for userspace to enable the
zone -(by which time we might have hit catastrophic thermal events
which may have been prevented if we had the zones enabled and cooling
devices functional.

-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to