From patchwork Fri Apr 17 16:20:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Pietrasiewicz X-Patchwork-Id: 11495525 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B16C81 for ; Fri, 17 Apr 2020 16:20:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 082EF2072D for ; Fri, 17 Apr 2020 16:20:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729868AbgDQQUc (ORCPT ); Fri, 17 Apr 2020 12:20:32 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:54726 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729581AbgDQQUc (ORCPT ); Fri, 17 Apr 2020 12:20:32 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 1A17C2A2AE9 From: Andrzej Pietrasiewicz To: linux-pm@vger.kernel.org Cc: Zhang Rui , "Rafael J . Wysocki" , Len Brown , Jiri Pirko , Ido Schimmel , "David S . Miller" , Peter Kaestle , Darren Hart , Andy Shevchenko , Support Opensource , Daniel Lezcano , Amit Kucheria , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Allison Randal , Enrico Weigelt , Gayatri Kammela , Thomas Gleixner , linux-acpi@vger.kernel.org, netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Andrzej Pietrasiewicz , Barlomiej Zolnierkiewicz Subject: [RFC v3 0/2] Stop monitoring disabled devices Date: Fri, 17 Apr 2020 18:20:18 +0200 Message-Id: <20200417162020.19980-1-andrzej.p@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <9ac3b37a-8746-b8ee-70e1-9c876830ac83@linaro.org> References: <9ac3b37a-8746-b8ee-70e1-9c876830ac83@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This is the third iteration of this RFC. It has been substantially rewritten compared to v2. The first patch makes all the drivers store their mode in struct thermal_zone_device. Such a move has consequences: driver-specific variables for storing mode are not necessary. Consequently get_mode() methods become obsolete. Then sysfs "mode" attribute stops depending on get_mode() being provided, because it is always provided from now on. The first patch also introduces the initial mode to be optionally passed to thermal_zone_device_register(). Given all the groundwork done in patch 1/2 patch 2/2 becomes very simple. This series addresses comments from Daniel and Bartlomiej - thank you guys! Andrzej Pietrasiewicz (2): thermal: core: Let thermal zone device's mode be stored in its struct thermal: core: Stop polling DISABLED thermal devices drivers/acpi/thermal.c | 46 +++++--------- .../ethernet/mellanox/mlxsw/core_thermal.c | 57 ++++-------------- drivers/platform/x86/acerhdf.c | 17 +----- drivers/thermal/da9062-thermal.c | 16 ++--- drivers/thermal/imx_thermal.c | 29 +++------ .../intel/int340x_thermal/int3400_thermal.c | 30 ++-------- .../thermal/intel/intel_quark_dts_thermal.c | 22 ++----- drivers/thermal/of-thermal.c | 30 +++------- drivers/thermal/thermal_core.c | 60 +++++++++++++++++-- drivers/thermal/thermal_core.h | 16 +++++ drivers/thermal/thermal_sysfs.c | 29 +-------- include/linux/thermal.h | 7 ++- 12 files changed, 139 insertions(+), 220 deletions(-)