Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp752824ybt; Fri, 26 Jun 2020 10:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJZWSP93dc83H0UP72+j2v8LbdIPdyDv7diJpNVVshu3N4sa9Vdy2Rsvj1a1lQGFdtJge+ X-Received: by 2002:a17:906:1386:: with SMTP id f6mr3605019ejc.66.1593193223367; Fri, 26 Jun 2020 10:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593193223; cv=none; d=google.com; s=arc-20160816; b=AefH8agDdIj7qlc6s3PAZZm7wGt3NVIk8Q4sO5muyKWf8Q+hlYDIptFBmc9o+wpAGB R2zYe0+NdTSjag/C0N6Pd0RxbdNARlJRHlRoV4XbFvSU/bbjoU9zpZng+jHO2Grq1yy1 QhntFM3qdcuf044gYmW4WBQxCRfBLqV6rOAxLMpMIOHGU8DjjlaBMWYH2Nioae/lZ8UF hehUAUtCOMEMLcgjE3CXtn/KFJsczD5qi/kRJ+2At4KnVeRjotZH0z7fUoqfGwdTu0YB AoED2kOAUSnj+ubITwPW893sBfbUH4ckAlY4mSKy5PC9Jdg4layXG7V7XroEJ/7MRvK4 ynDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=eGOMlCP3NIWuKSbtJbac7gw9loxm3pKb66d9hAv9KvI=; b=czUiShhzYaqTxXe/GIbr1FWIy56HrW0/Qyulg1q0Cgl07AFunMEZRsaChxP1mXCUxX jpTgP+MUsMVStuREUng7fo5Ud646ERF8OfyGTx+k4WCBqvYxxv9yYPDJs6ZIL6DyyAWD l49n9kzWdWWo/LJXmRghzvGhtPrlWCpPNFVxk+B3q00Qa4DEK8f/WDJj5YL5pK1Kdta5 zpl29jMYaAxdQXzB+JlwMjtQa9hDtl1XS/KdmZpOlEV84h0xAPDShNg02z0o7RIa/kjy 878t6RinRhmPO6HD390k5HjfjNk0yp1csQmPiJmgF9iSpb/Tzg/d6fDwrLS4vRnq/GfC h8SQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si12123431edv.266.2020.06.26.10.39.59; Fri, 26 Jun 2020 10:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbgFZRi4 (ORCPT + 99 others); Fri, 26 Jun 2020 13:38:56 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52444 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbgFZRiM (ORCPT ); Fri, 26 Jun 2020 13:38:12 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 9F6352A5E4B From: Andrzej Pietrasiewicz To: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: "Rafael J . Wysocki" , Len Brown , Vishal Kulkarni , "David S . Miller" , Jiri Pirko , Ido Schimmel , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Kalle Valo , Peter Kaestle , Darren Hart , Andy Shevchenko , Sebastian Reichel , Miquel Raynal , Daniel Lezcano , Amit Kucheria , Support Opensource , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Heiko Stuebner , Orson Zhai , Baolin Wang , Chunyan Zhang , Zhang Rui , Allison Randal , Enrico Weigelt , Gayatri Kammela , Thomas Gleixner , Bartlomiej Zolnierkiewicz , Andrzej Pietrasiewicz , kernel@collabora.com Subject: [PATCH v5 03/11] thermal: Add current mode to thermal zone device Date: Fri, 26 Jun 2020 19:37:47 +0200 Message-Id: <20200626173755.26379-4-andrzej.p@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200626173755.26379-1-andrzej.p@collabora.com> References: <9cbffad6-69e4-0b33-4640-fde7c4f6a6e7@linaro.org> <20200626173755.26379-1-andrzej.p@collabora.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz --- include/linux/thermal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 216185bb3014..5f91d7f04512 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -128,6 +128,7 @@ struct thermal_cooling_device { * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature * @trip_type_attrs: attributes for trip points for sysfs: trip type * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis + * @mode: current mode of this thermal zone * @devdata: private pointer for device private data * @trips: number of trip points the thermal zone supports * @trips_disabled; bitmap for disabled trips @@ -170,6 +171,7 @@ struct thermal_zone_device { struct thermal_attr *trip_temp_attrs; struct thermal_attr *trip_type_attrs; struct thermal_attr *trip_hyst_attrs; + enum thermal_device_mode mode; void *devdata; int trips; unsigned long trips_disabled; /* bitmap for disabled trips */ -- 2.17.1