Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp678421ybm; Thu, 28 May 2020 12:22:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzUgg492Kmq7qeDqHrO0vGBh62cpo7mlyr9eql2VElDyJo6C6Tz5Bg+Vtz2uLDnh6gDjDA X-Received: by 2002:a05:6402:19a9:: with SMTP id o9mr4346340edz.205.1590693774152; Thu, 28 May 2020 12:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590693774; cv=none; d=google.com; s=arc-20160816; b=wEA8VnZ3PwtQbwur2xjx96EOTYivB1iZzcKfc5IV7gNSPP+mhBG9rX/7EsWlRhAgZu CS4td/eynvh6q+vp3DfrxhU2nIJPdjRreLMcL7egLVRfWW/Opq+atAmrQpy392zwMuCU Bc8pVTk6a/C3VUUAZWUir+kO+yPni03JoNQ8JwPbLmcBB4We2fYgLoS/qp8qxN0qc8X/ BIx+f4IAK/TyFgL1vF7Cgrf+4SEqIcT7e6PsxIHZr70tFJ7JhZhVlg3pAgA5oJepzcU6 SOqfw6luEYaMxBlgUob1nIh/LGhItkTeYbn/jpKXo6MrVBu+dQSSc/rxG32NbGNwcW2Q cKSA== 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=YJxtajWptNO0X5S1SGnH3ekHGPL71atHqSulTQwwypA=; b=WNZ8wi6rgOl+MvWJkX5aO53k/A+CxNCloVSm5qskFqB+nRekgvmQmecRvisGdkrYX2 lkd9FuXbOoDi7VCb+TG4DShrDbAcak6n7SOmx3RO0nsazTkalrWi8sWuG1B4HUXXVGOx HQ8mBv+5+zWDGv0jlGozXX+X2Kf8z3LlDZcY3OtwW7i9bmLlD9c2I/fGxbYNHAEyrBqM ECfnPe/ozHxSxozf4WsprKs9DcEOF4gaxzGh38zumSUy1B6CGoRk6/HV90p5g5iTBkYU ETFqZAjHnibelDgGgVuxQyA0DxoBCUEjZwoqrsx8ck86hCxBoz9qPslU9aS4A3DrlGyv MN8Q== 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 p7si4468694ejr.611.2020.05.28.12.22.30; Thu, 28 May 2020 12:22:54 -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 S2406259AbgE1TV4 (ORCPT + 99 others); Thu, 28 May 2020 15:21:56 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57664 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406397AbgE1TVu (ORCPT ); Thu, 28 May 2020 15:21:50 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 8F5282A2B09 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 v4 03/11] thermal: Add current mode to thermal zone device Date: Thu, 28 May 2020 21:20:43 +0200 Message-Id: <20200528192051.28034-4-andrzej.p@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200528192051.28034-1-andrzej.p@collabora.com> References: <20200528192051.28034-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 --- 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