From patchwork Tue Jul 16 17:34:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Rapha=C3=ABl_Gallais-Pou?= X-Patchwork-Id: 13734712 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49B9DC3DA59 for ; Tue, 16 Jul 2024 17:35:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kchnNo8yPLFh2dK5IcV05EsWvdVMiZ16c0fFJ750TxA=; b=R/rThZFoYhjl7E jcA0RKyqTBjQLCvR9XNp4vuLQy+MFQmdJwMJwieoAk9OXLiUHC2QIKFr2Mr4dnH5MGCxKvCWXumjU CXi7N0hH7PLGeCPCPIFNoC9PJaPK4x/1+JQ2DWh2xtXf1lBY5UkPUif+Vu+zZl8gSZozuQmGP/4sR y5uhhoZBhjUuy55Djl2vy3b1sYb30wksdVs3zSNMwYxFFUZUAEh6olQIebpeYVemcnw/yce87+zws K6qODQ5qxpw8vBam6vh4nQF+7OcLHbzvliUcTKDFsXbqbxIErdOjo+NFBIbFn1MpEQoCqZoh8Q/bE BgLxTH0GWh7xz6HEBdwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTm5P-0000000B9ld-1jxs; Tue, 16 Jul 2024 17:35:35 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTm54-0000000B9ff-3J16 for linux-arm-kernel@lists.infradead.org; Tue, 16 Jul 2024 17:35:16 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52e976208f8so6301018e87.2 for ; Tue, 16 Jul 2024 10:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721151312; x=1721756112; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=kchnNo8yPLFh2dK5IcV05EsWvdVMiZ16c0fFJ750TxA=; b=kLCHgB97Dozg5jO1PZBxppSPEilWFbcD+Sr1Hqb+tIUWoEGMmzdPQur2t0KRyqtwls 3KwzDWRg2bxV5zIHeYDpXFe2skkJw6bU2Uh5eMJfWzWqYMf3ALZ6qshZAT97fEEAdy7D DJJQPImeYJAP8w5jU6NbFig+qXJXJvT6wlxWy58bzyHdg3X+9lM4n5LwIqQZJZLvfPvN A2ALkn9n60mKOFE/eXoayjaL+qeLABH5qguLigbcQzDasJ30Ox+ZpgjE42ZMATEAogFH 2hQV7zxV09co7ZywLZH5myEQrTRG7hvbf1WMlbnjkSjMmHTZWccYTP127K+3KHAVWlPN FpHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721151312; x=1721756112; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kchnNo8yPLFh2dK5IcV05EsWvdVMiZ16c0fFJ750TxA=; b=sPvMm8lL/QhideWFyHL+vropw/9jvGibq4EBLeAUuOpPwd46wJpbTm4ZVCAi3RAB46 4KaqrhwXY/g19jl5zk1/I/54+gjP4uhZvDQzotCPHXn57p26Rn2i4X6SzpWA4H/vCFIx 2x2WjY+yHFBOnsu0o/hJ7UIZJtUGWGaqkRD8omcF4bJbjoY9u8egbF4alctsrx1Wkefl /+N3JkWlDd8YSK6GdbMInrBSgC13cLxQAeBEeyqcgjG351QxDxsSzmpQarvv1loEkiOT GYV0b4h7KwtfL5w/X/YDn5oqvz+wvf/SaiT4t9btw0riVz6XucBdqKsHJxunqE8K0rQQ U6Bg== X-Forwarded-Encrypted: i=1; AJvYcCWhKWm8LooYVrINGod4yF5xj+cOGzLbJZs1/O83u6wNfmaPn7Y237z35lm4AJTM2M8HKIT6tJqnsqtGSpDJigUyCtZ4g14twcXqMKMz2a4c1DYhwH8= X-Gm-Message-State: AOJu0YwfGAnZnAXj2aNgDyNkFRBBv0Kz7qEQrEfXSFTganx0QWBndB3q mkHpdpL4sSBxnQxxg+QTwbctK9uIMhVyWXJJYP4DOnnpaA9LbEd1sFz38Q== X-Google-Smtp-Source: AGHT+IE2mB4oZTOTvFDO5DkXK2tpo0pPHe/jgiUbxjLLBf4wAR3RggsbcbiEp4YgqrGFa1ldiV2H0w== X-Received: by 2002:a05:6512:e93:b0:52c:8e00:486a with SMTP id 2adb3069b0e04-52edf038979mr2407374e87.55.1721151311803; Tue, 16 Jul 2024 10:35:11 -0700 (PDT) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f2397easm172599675e9.6.2024.07.16.10.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 10:35:11 -0700 (PDT) From: Raphael Gallais-Pou Subject: [PATCH v4 0/2] Add thermal management support for STi platform Date: Tue, 16 Jul 2024 19:34:50 +0200 Message-Id: <20240716-thermal-v4-0-947b327e165c@gmail.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIADqvlmYC/2XNTQ7CIBCG4as0rMUUGCx15T2MCwpDS9IfA02ja Xp3aTcYXX4TnpeVRAweI7kWKwm4+OinMQ04FcR0emyReps24SWHUjJF5w7DoHuq3IVL4EobV5P 0+hnQ+ddRuj/S7nycp/A+wgvbr/+NhdGSVtYZLdCChObWDtr3ZzMNZG8sPLv0W3Y8ucYpIQGtZ Ii/TmRXMchOJKeU46BqdJWV327btg/VmqHEDgEAAA== To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Maxime Coquelin , Alexandre Torgue , Patrice Chotard , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240716_103514_852135_1A7C7351 X-CRM114-Status: GOOD ( 15.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series enhances the st_thermal driver in order to enable support for thermal zones. The changes include: 1. Replace deprecated PM runtime macros with their updated counterparts. 2. Implementing devm_* based thermal of zone functions within the driver. 3. Updating the stih418 device-tree. The device-tree patch depends on an earlier patch sent to the mailing list [1]. As it is currently implemented, an alert threshold of 85°C is set to trigger the CPU throttling, and when the temperature exceeds the critical threshold of 95°C, the system shuts down. There is for now no active cooling device on the platform, which explains the use of the cpufreq framework. [1] https://lore.kernel.org/lkml/20240320-thermal-v3-2-700296694c4a@gmail.com Signed-off-by: Raphael Gallais-Pou --- Changes in v4: - [2/2] optimize dependencies - [2/2] do not return devm_* exit code - Link to v3: https://lore.kernel.org/r/20240714-thermal-v3-0-88f2489ef7d5@gmail.com Changes in v3: - Fix unmet dependency in [2/2] - Remove no more used variable in [2/2] - Remove already merged patch in soc tree - Link to v2: https://lore.kernel.org/r/20240625-thermal-v2-0-bf8354ed51ee@gmail.com Changes in v2: - Add Patrice's R-b - Edit patch [2/3] to remove unused struct - Link to v1: https://lore.kernel.org/r/20240518-thermal-v1-0-7dfca3ed454b@gmail.com --- Raphael Gallais-Pou (2): thermal: st: switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() thermal: sti: depend on THERMAL_OF subsystem drivers/thermal/Kconfig | 2 +- drivers/thermal/st/st_thermal.c | 32 ++++++++++++-------------------- drivers/thermal/st/st_thermal_memmap.c | 2 +- drivers/thermal/st/stm_thermal.c | 8 +++----- 4 files changed, 17 insertions(+), 27 deletions(-) --- base-commit: 4f40be61af99a67d5580c1448acd9b74c0376389 change-id: 20240518-thermal-8f625428acf9 Best regards,