From patchwork Fri Nov 24 18:48:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1868271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ScPBn3ylbz1yRy for ; Sat, 25 Nov 2023 05:48:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1r6bDt-0004Im-IP; Fri, 24 Nov 2023 18:48:17 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1r6bDn-0004HR-QQ for kernel-team@lists.ubuntu.com; Fri, 24 Nov 2023 18:48:11 +0000 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 48F6D40DAD for ; Fri, 24 Nov 2023 18:48:11 +0000 (UTC) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-54455e2a5c8so1345593a12.3 for ; Fri, 24 Nov 2023 10:48:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700851691; x=1701456491; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rWV+KRF9RtBBJAPbUOk+2W6jSzeMYEYBH0YfejAeUz8=; b=YoBC23hamzpVm2+F1XQUMlOd/0P/pDx/JFzfUfyiAenMLCebhAPny6k36/Jb96n8N8 X47wcNgnV/B2ciO9fpdMSExHmdeEpcDq2+5Cu78ftPI2Ra/s1ZJSX6JSjQMCuR5j/gYu bH/OSnlxQq10v9tf9LUNXaemrUAtUVi25xUbjyzt5WnpLJFsRNhQlPtbBrlR0PKt2jzH t/OXBBIR3/sRxQALW9kYH7jJUbFHDWpaPQSNYIFwfW6GtRQcKTgGEEah+6oyWgDf5XZ5 u7n8tOXbaOrYO19l+Q9N9VpBriX4tMCnTB8znf54mvj2f3EEKgt4QLXc0QMxN+LGG4iP af0w== X-Gm-Message-State: AOJu0YzojVz60cT3ryL7TkktFZI4Ud7fc+VsncC/xfceUCON4UXnzn3z Ildh5JFhO56GxU8LOR94zcRbCggkZ5WsYIMuhCrACuUbfP60RyyenmiZmQrI/CzNSLjhdUCqFp9 80Ve9sbP19D+78eLbKb6qbquUBz00SHIQ3URVMHVlr9EZHjvJxQ== X-Received: by 2002:a50:9ea2:0:b0:544:1fb7:d5e8 with SMTP id a31-20020a509ea2000000b005441fb7d5e8mr3225383edf.0.1700851690873; Fri, 24 Nov 2023 10:48:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IF17YyQ5Ts2vMTS7qTGj1S6gcBjn6waOspivR5YmhMJTpsQ3GfAJf12/5Br62gc6CpEGHXMpA== X-Received: by 2002:a50:9ea2:0:b0:544:1fb7:d5e8 with SMTP id a31-20020a509ea2000000b005441fb7d5e8mr3225366edf.0.1700851690598; Fri, 24 Nov 2023 10:48:10 -0800 (PST) Received: from localhost ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id u11-20020aa7d88b000000b0054897d70ce1sm2027389edq.71.2023.11.24.10.48.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 10:48:10 -0800 (PST) From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][M:raspi][PATCH] Fix hysteresis support in gov_step_wise.c (#5736) Date: Fri, 24 Nov 2023 19:48:09 +0100 Message-Id: <20231124184809.111143-1-juerg.haefliger@canonical.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Jürgen Kreileder 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 (cherry picked from commit d3668f4e7e2747f38d7f680df231f02dd33d3a13 rpi-6.5.y) Signed-off-by: Juerg Haefliger Acked-by: Agathe Porte Acked-by: Jose Ogando --- 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,