From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BC55C352BE for ; Tue, 14 Apr 2020 18:03:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1382920767 for ; Tue, 14 Apr 2020 18:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503169AbgDNSBU (ORCPT ); Tue, 14 Apr 2020 14:01:20 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:46626 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730908AbgDNSBS (ORCPT ); Tue, 14 Apr 2020 14:01:18 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 5A7222A1BDC 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 Subject: [RFC v2 0/9] Stop monitoring disabled devices Date: Tue, 14 Apr 2020 20:00:56 +0200 Message-Id: <20200414180105.20042-1-andrzej.p@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <2bc5a902-acde-526a-11a5-2357d899916c@linaro.org> References: <2bc5a902-acde-526a-11a5-2357d899916c@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This is the second iteration of this RFC. The series now focuses on cleaning up the code in the first place. After the cleanups in patches 1-3 struct thermal_zone_device is extended so that it contains a "mode" member (patch 4/9). The next patch (5/9) makes all thermal zone devices use the "mode" member. This patch makes drivers' ->get_mode() methods redundant, so the next one (6/9) removes the method altogether. Patches 7-8/9 ensure that after changing thermal zone device's mode an attempt will be made to monitor the device. And finally patch 9/9 prevents DISABLED devices from being monitored. It also adds THERMAL_DEVICE_INITIAL to accommodate the devices, which should be monitored but cannot be initially ENABLED. Andrzej Pietrasiewicz (9): thermal: int3400_thermal: Statically initialize .get_mode()/.set_mode() ops thermal: Eliminate an always-false condition thermal: Properly handle mode values in .set_mode() thermal: core: Let thermal zone device's mode be stored in its struct thermal: Store mode in thermal_zone_device thermal: Remove get_mode() method thermal: core: Monitor thermal zone after mode change thermal: of: Monitor thermal zone after enabling it thermal: core: Stop polling DISABLED thermal devices drivers/acpi/thermal.c | 44 +++++---------- .../ethernet/mellanox/mlxsw/core_thermal.c | 43 ++++----------- drivers/platform/x86/acerhdf.c | 28 +++++----- drivers/thermal/da9062-thermal.c | 12 +--- drivers/thermal/imx_thermal.c | 30 ++++------ .../intel/int340x_thermal/int3400_thermal.c | 39 +++---------- .../thermal/intel/intel_quark_dts_thermal.c | 27 ++++----- drivers/thermal/of-thermal.c | 28 ++++------ drivers/thermal/thermal_core.c | 40 ++++++++++++-- drivers/thermal/thermal_core.h | 2 + drivers/thermal/thermal_sysfs.c | 40 ++++---------- include/linux/thermal.h | 55 ++++++++++++++++++- 12 files changed, 180 insertions(+), 208 deletions(-) -- 2.17.1