APPLIED: [SRU][M:raspi][PATCH] Fix hysteresis support in gov_step_wise.c (#5736)

Juerg Haefliger juerg.haefliger at canonical.com
Tue Nov 28 10:40:58 UTC 2023


Applied to mantic:linux-raspi master-next branch.

...Juerg


> From: Jürgen Kreileder <jk at blackdown.de>
> 
> BugLink: https://bugs.launchpad.net/bugs/2044341
> 
> Fix hysteresis support in gov_step_wise.c
> 
> Directly get hyst value instead of going through an
> optional and, now, unimplemented function.
> 
> Signed-off-by: Jürgen Kreileder <jk at blackdown.de>
> (cherry picked from commit d3668f4e7e2747f38d7f680df231f02dd33d3a13 rpi-6.5.y)
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
>  drivers/thermal/gov_step_wise.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/thermal/gov_step_wise.c b/drivers/thermal/gov_step_wise.c
> index eefeb6407d0f..8b83fbb933db 100644
> --- a/drivers/thermal/gov_step_wise.c
> +++ b/drivers/thermal/gov_step_wise.c
> @@ -98,11 +98,8 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip_id
>  		trace_thermal_zone_trip(tz, trip_id, trip.type);
>  	}
>  
> -	hyst_temp = trip_temp = trip.temperature;
> -	if (tz->ops->get_trip_hyst) {
> -		tz->ops->get_trip_hyst(tz, trip_id, &hyst_temp);
> -		hyst_temp = trip_temp - hyst_temp;
> -	}
> +	trip_temp = trip.temperature;
> +	hyst_temp = trip_temp - trip.hysteresis;
>  	trip_type = trip.type;
>  
>  	dev_dbg(&tz->device,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20231128/2cf5fa3c/attachment.sig>


More information about the kernel-team mailing list