From patchwork Mon Jan 14 16:34:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155551 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3857298jaa; Mon, 14 Jan 2019 08:35:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN4E6oLrrYLHN67BZt5UqVliofgwn6hQ90Xis48Aql0sb6bV6JUeLZKrzGj/dGj1Yi+m+Swy X-Received: by 2002:a65:4049:: with SMTP id h9mr23206461pgp.304.1547483756373; Mon, 14 Jan 2019 08:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547483756; cv=none; d=google.com; s=arc-20160816; b=KVeY4DcP1kvOl9+xhf5mFWYtcITEU6pdNkcH6blcMcD47Tz14IODiOU6j771jzbr/V R5bBC9OCpI4x8cTqx5Zud9L18GvKlkexOxq0ako9R56oL7ajlXFLdSA8yjJZVjBEmba+ UP3J8LuGC9+J4dnV8Q9d5OXumoaxzobgm8TO8h8Ft5U388adabB3tlChuTvNCUp5AnWt cUT8Ib2Jw/pZPalo7JLk+h/dfomty3jEKHHbjHFIcbQTK1P1XZJWjYg4dbWqmHht+YX+ TKB1/p+ABZXd7EysyIlZSH+hwSGwgtsNcvtMnxsMzl20yp3ubCC7C2A+5HgJhXxJgnE0 JUAQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=B3U4dJNDxXU77aqEF/bd0F2FU2BzXMK0qQTt7fghjFA=; b=wHW7gGMbI/QFyAibNxKZL+qyYNef4syVNfOnXk5YXQfxzEN6e70blNXoEoHf/zLEZO k6htqYsTsHwOTEoLvsXAaseVgSYLzj3cS7V5P+P1Kwn+DOrr3DznxTeB21fEnUkAvhP6 d5SvefvdXEewei0DdRumQCkGiLVZAD+7SuHEJ11ctRef6MzUrmX3h/flnJOFRhAGx05Q mfvPykYuG1V4joGACGbQQc3UJ0Ez8HcrIy6SaqUQhJV9vTLScJViD5B+1V+Ze6olhx7w tbU/SqN0iG7oKphxytTCusPOT5rCBa5L86sE/jS/vqJBh1Nj/zvvjLS69ne1jMihUt51 l0Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4M5RU4V; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si694417pgc.150.2019.01.14.08.35.56; Mon, 14 Jan 2019 08:35:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4M5RU4V; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbfANQfz (ORCPT + 11 others); Mon, 14 Jan 2019 11:35:55 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55671 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726749AbfANQfz (ORCPT ); Mon, 14 Jan 2019 11:35:55 -0500 Received: by mail-wm1-f65.google.com with SMTP id y139so191659wmc.5 for ; Mon, 14 Jan 2019 08:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=B3U4dJNDxXU77aqEF/bd0F2FU2BzXMK0qQTt7fghjFA=; b=B4M5RU4V6n94aCrZUAH4F+wWJFxlWEjftqPmqqs9uGUOVv7uhSwYIroen676tDJlF5 hkQX2V22SJAdhYFTVYGk4RrPtxQGztGimctR6XBW5mrHdmQq0U/kYn+0S82kNAwq1FcA d9EtaVmC32Cva3n6CAu1Q77AuJ4mCqKHe7K0E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=B3U4dJNDxXU77aqEF/bd0F2FU2BzXMK0qQTt7fghjFA=; b=HqaYsixm6oaM/jJ7tG4lw7DcXecNwXeM7iBnf3Z6LWOzEo+V1bsRLz4j1LDg1SMxua y52OUSyY1LgjqJ0z53wWhCqXi2GvBPTaDaA1w16mfnFeOUSUybepOc46bF0Ot5cd/jf1 js4TdcceF7+pdFzAdRwm0PjIEo83op2YiVODQEmQ2XxMeeR6Grb1yVbSpecJjx8tc/3Y t6L59u/etjad+CHFqI6MgvI98aRROP1B42yZynJEizKY2Rn6U5u/XL+VP7jAZCI/9Jve E/eYs/GlyYuIo6j8kg2VTcxtynZ/nQxkB/F6f5MYmPcVetltbGUNmn6MxgIuVrrKU3Eu /ijA== X-Gm-Message-State: AJcUukc9t+EIrljUPfMlwkakyS2X14KlOmHEDQGVyBPCz6rpHUjupk3X H4whnFQaZbx9x4G7DTr7Hkn81g== X-Received: by 2002:a1c:aa0f:: with SMTP id t15mr12308049wme.108.1547483753190; Mon, 14 Jan 2019 08:35:53 -0800 (PST) Received: from localhost ([49.248.190.171]) by smtp.gmail.com with ESMTPSA id w12sm65168974wrr.23.2019.01.14.08.35.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 08:35:52 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: [PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Mon, 14 Jan 2019 22:04:53 +0530 Message-Id: <168294311714f269b1050bcbf5d3324eae0808f2.1547481320.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Several cpufreq drivers register themselves as thermal cooling devices. Adding a pointer to struct cpufreq_policy removes the need for them to store this pointer in a private data structure. We can then auto-register the cpufreq driver as a thermal cooling device from cpufreq core code. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..7d0cf54125fa 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,11 @@ struct cpufreq_policy { struct cpufreq_frequency_table *freq_table; enum cpufreq_table_sorting freq_table_sorted; +#ifdef CONFIG_CPU_THERMAL + /* Pointer to the cooling device if used for thermal mitigation */ + struct thermal_cooling_device *cooldev; +#endif + struct list_head policy_list; struct kobject kobj; struct completion kobj_unregister;