From patchwork Tue Jun 25 21:32:39 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: 13712070 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 8ECAEC2BBCA for ; Tue, 25 Jun 2024 21:33:46 +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=GkKB4GxtrWlg/r+kXFJYqrA8LJ2kMmmjaxb+VTbBkRE=; b=KP1iMDuPOIXwP/ wgf9QWHXrWmv0d0XomVB2RIKeQgi28gvdAJoNDOgjzYMG8uhe9AP5Gp7I3PePfjH722NImUd3tmcT utmvT57F96/fwZr+frCXA9sNEDx4vU81qbSlOGsvv0gecJUqvFnsfwdLHkrroq1Y/Zq/zICp54ioo m7wbmaR0gMwprEx1LoODyKY3gqoNcZTCo3wdgK1R2pbCHs+iSVnIDquQEz5D/avux1134HQ6CGzhC 4ynIsMw+XdIRb7wYOch2Y6xGV3WcxlgLxEJvPxY+XZ9CSrEjJ7Wr64MPfu4Oyjf1RoYscYK46pOPM JgxuP0aojoNIaDNP+Iyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMDn2-00000004aCN-0bLe; Tue, 25 Jun 2024 21:33:24 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMDmu-00000004aAU-1s79 for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2024 21:33:18 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-364cdfdaf91so4389384f8f.1 for ; Tue, 25 Jun 2024 14:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719351193; x=1719955993; 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=GkKB4GxtrWlg/r+kXFJYqrA8LJ2kMmmjaxb+VTbBkRE=; b=GWIiWLfdljg/0UaIphHKdE45XoO86RYT0wuzy4W+lxd7Rq+rk/taJsFI2vb1P2wC+V ah5h4eGGbOlZDqELcxAAZDU8VFkMR3kYK5IQe6SASwqL/HzDzc9It5iPQywUI6OrBhvr cBHFJYZh5OuTAi4rePFdAM41YEHRAPdH0aYuCNsv4gPCXpxji+delZQ8lIE2l3Gik8Ib +Pq4KvDuizbi4+T54mtG1ff6o43B95+5mhKtEeuSoHWqXXvjB4JtKdsVbgc1u7T9d31a 9pP8purKnS0wQ22CYEIFs+RuUwPNw1L0WTv6vSDpESLuVc2EihLDo7xSFoeWsWjCgFah jizg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719351193; x=1719955993; 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=GkKB4GxtrWlg/r+kXFJYqrA8LJ2kMmmjaxb+VTbBkRE=; b=VFlVM32C6P0llILyEwn+cH5zsOzihdb+7uV24RQHUTExjaorTQkMDKWpefgfXZGv5K VwqpoExrru6fh97v1RybTi10YMQbNKkkLPZIs/1aZAORgqyltzlZFu6c/ZCy09VH5bii 38s7oSM7AecIbNjg/FG1NPuJZk3u+jXUnelDSKbpCPjUhdc9+e8vu8Ns0gtm4Vy9w129 j4SSuaUIvvMDCs1ilTQfWTVx76Tkt1BmsdTg5TRSI4HNbYXPOgjcFNFAuVU5qr3cgEb/ n0H2PYw4pP9zQeuvK7AyrL6l2//gmwXpvmy3f1xfDFhOG5Ih5YwFA64sV98PrWR9NEeM Tglw== X-Forwarded-Encrypted: i=1; AJvYcCXCEy0lWiCsKXyHaAE3j8gy3bkG5EUc8Wuh/5Y2dEoreMupdBRMrLS/ZrjHMoNvfL3Ld0viH7V3t2UwguvhJhsn+6FvCuVRjMtah3+TkCUSCnnhSUc= X-Gm-Message-State: AOJu0YyE7n+Y3LYDEUkteZsyFQp1UZ4L6/DL21ErBmt8kKIf3jUfIppC /3mDip/agz9Fko2SQv0LKIqvrzHPJWV0uF25DHlsO5vZlleh2EUN X-Google-Smtp-Source: AGHT+IHJsvMy2gyT8lX6O4uQaNgdEVNrVh/pEyToiulrY3Z1uOuSVV5HU3UP95uu+B3Bbmdmm1Rm+Q== X-Received: by 2002:adf:fa41:0:b0:363:7788:b974 with SMTP id ffacd0b85a97d-366e96b234emr5482775f8f.53.1719351192919; Tue, 25 Jun 2024 14:33:12 -0700 (PDT) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c8251dc1sm1785695e9.17.2024.06.25.14.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 14:33:12 -0700 (PDT) From: Raphael Gallais-Pou Subject: [PATCH v2 0/3] Add thermal management support for STi platform Date: Tue, 25 Jun 2024 23:32:39 +0200 Message-Id: <20240625-thermal-v2-0-bf8354ed51ee@gmail.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHc3e2YC/2XMQQ7CIBCF4as0sxZTEBRdeQ/TBcLQTlKKgYZoG u4uduvyf3n5NsiYCDPcug0SFsoUlxbi0IGdzDIiI9caRC9kr7hm64QpmJlpfxZKCm2sv0J7vxJ 6eu/SY2g9UV5j+uxw4b/13yic9ezivDUndFLJ530MhuajjQGGWusXECQ1zZ4AAAA= 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-20240625_143316_510656_C3831CA2 X-CRM114-Status: GOOD ( 14.44 ) 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 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 (3): thermal: st: switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() thermal: sti: depend on THERMAL_OF subsystem ARM: dts: sti: add thermal-zones support on stih418 arch/arm/boot/dts/st/stih407-family.dtsi | 6 +++-- arch/arm/boot/dts/st/stih418.dtsi | 41 +++++++++++++++++++++++++++++--- drivers/thermal/st/Kconfig | 1 + drivers/thermal/st/st_thermal.c | 29 +++++++++------------- drivers/thermal/st/st_thermal_memmap.c | 2 +- drivers/thermal/st/stm_thermal.c | 8 +++---- 6 files changed, 58 insertions(+), 29 deletions(-) --- base-commit: 0fc4bfab2cd45f9acb86c4f04b5191e114e901ed change-id: 20240518-thermal-8f625428acf9 Best regards,