From patchwork Sat May 18 12:12:03 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: 13667598 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 729F8C25B74 for ; Sat, 18 May 2024 12:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To: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=MfBVdjEe/wHScyWKwOxXKIMppEm/XvxCSiardz0Lvdk=; b=rRJLuro/T45pE+ ZkoCr8mjBKVAQVM02pjV4p1Jz1kzUQA+fEAYjtHigtiWhh+wjQUgqFZq2LkN4Trp3/AX8xhYt5iqC PicJ8dkuk83Vhwgb7sf99T68QE3GsTcdK74Xsgf1DFAoopAUr/PvfHgICsNfwvoeAgTFPSZ2hQW/k IdBDkfKO2Jat/+ILXk/uGm8LWS0sGjf/jh3FeHTHMZFIXhMw475em3/n8S1sww9jceKglkS3Mdj1A NSSSmTOlWcwrM9VInUiK11LDxNZU8SMSYU7H+TMF1vJYDcOEGRHq0qRF5eL9X75MwZgyLo3XqUfKX A039v0/LFtU/AOmOj93A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s8Ivs-0000000A2RX-1YnI; Sat, 18 May 2024 12:13:00 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s8Ivo-0000000A2Q2-0dNS for linux-arm-kernel@lists.infradead.org; Sat, 18 May 2024 12:12:59 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-34d7b0dac54so560284f8f.0 for ; Sat, 18 May 2024 05:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716034369; x=1716639169; 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=VjQuoZFHMHA8S1ZSu4KweX7Wc6yX45qb5CUfF3JC+3g=; b=BMdocJwfse0qfOf0KHTahKo8iSpp3dXiPBIPe5cF4GRKxtnC+mxihJhZz1omm4Wouj cANN7yQDC+tK04eUdlt8Mpr4KuL+GqSzIt3jSDT8OLdgdMXmagBkx1iLCitYC2yderX4 ZZAieL4W767yz5kGyic24G8HTRbo5tM1R2jZGBtmib3JAqhbhk+AjUyLfUPeEEWQoa8R BaqgjWDITHh0hnT6UQ8Hw/7Wm0jn56s9nrJzBcf061Bov2IzBbLnPimnLz4pskzSp2aY 3OSaXbQVpv5/SEdDcZTuXqPgtd+vkM7GpNhGE5OUAn7VI12Y/TuH1GDQBjD8yEXkGlAM qXjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716034369; x=1716639169; 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=VjQuoZFHMHA8S1ZSu4KweX7Wc6yX45qb5CUfF3JC+3g=; b=JKsdwlYeqJ2KaIu11aRlyJrofCt/rb/jSedaYWWTuw5MUlzLoLKJuMqfuqStm6LEeO R5+OIRaCiSWDlwr7AoGTM0DWqXYRhXwYOp3eDJwfGr/t31QtYImIggTKL/9tor4ZlIOI AxKYUxMb/aE4bqn05PlyMaSKVrGsZEwJJzbYjj+rH49qbNVhTiVbldTZVuMCW9lcj2pP bjN5hol9FLBfLd8cGdWuEpvkdi7wd0E0eS8OEjFEBdEPKDivk6n+tkO3Jck2AI0u+FEG 00OzN9mqGOLEltw6lT/Aqmxr/DgAh2m3I0yHXpX3eUi6dwjoBkROar48naEgpGiutQf5 yS8Q== X-Forwarded-Encrypted: i=1; AJvYcCX8oJ7kMKIReYpyHSfMYZNWwnidVAxs+tSDdRtfoskM8gzVnCQPPuAcDZakve+AJ293RFjMNkbs0w9vSpDe70uaKZwUFgHsbX54ACeM6508bF0R1EU= X-Gm-Message-State: AOJu0YxCe+MOcvU8uvyaW4rMS0VIKTKNcNf36O7xtazvrxe2RPRg3XM0 cWigcmeiUpAc1vglhFNe8mP7HYHv/S76UhyY5yWuGnvDgDKVpbR/ X-Google-Smtp-Source: AGHT+IGPNIPUXCl8p9mcn96OQDjPifRyietNIMcyjKmJFSVcHTvDZHbrKpLqRbHX7v2igTtLoYFISQ== X-Received: by 2002:a5d:4484:0:b0:34c:e0d6:bea6 with SMTP id ffacd0b85a97d-354b8e3733bmr1436214f8f.29.1716034368352; Sat, 18 May 2024 05:12:48 -0700 (PDT) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502b8a76e6sm24059321f8f.62.2024.05.18.05.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 05:12:48 -0700 (PDT) From: Raphael Gallais-Pou Subject: [PATCH 0/3] Add thermal management support for STi platform Date: Sat, 18 May 2024 14:12:03 +0200 Message-Id: <20240518-thermal-v1-0-7dfca3ed454b@gmail.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIABObSGYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDU0ML3ZKM1KLcxBxdizQzI1MTI4vE5DRLJaDqgqLUtMwKsEnRsbW1AJA ZiwxZAAAA 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.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240518_051256_292809_ABD34133 X-CRM114-Status: GOOD ( 14.62 ) 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 To: Rafael J. Wysocki To: Daniel Lezcano To: Zhang Rui To: Lukasz Luba To: Maxime Coquelin To: Alexandre Torgue To: Patrice Chotard To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: Raphael Gallais-Pou --- 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 | 24 +++++++++---------- drivers/thermal/st/st_thermal_memmap.c | 2 +- drivers/thermal/st/stm_thermal.c | 8 +++---- 6 files changed, 58 insertions(+), 24 deletions(-) --- base-commit: c75962170e49f24399141276ae119e6a879f36dc change-id: 20240518-thermal-8f625428acf9 Best regards,