Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3763910imu; Mon, 14 Jan 2019 08:37:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN7o8AwP9L/l9GJcRvwiSSetnwgGb8CJU28xJRs8YpnnFySsX/KkRjHmGFdDhhnc2msjxkxu X-Received: by 2002:a17:902:a50a:: with SMTP id s10mr24983201plq.278.1547483843089; Mon, 14 Jan 2019 08:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547483843; cv=none; d=google.com; s=arc-20160816; b=IvTp5XZqibDSRnTM2CJZxObJYC2PGkQX+BXdQJ2Bzp/qOnYuh2rknGqWX0ijhBOqiQ qGStgJOrJjqDtHp74lKxNLu3NAte+XNXOxJMlutYzfqbZzVZ4i8gbuBCj1y921Ds8bH+ +xsECgOZMPT/DkZRnM7Ck35RPKZuU/qEaqbJK86IduiLO0TJaECy3yNIM7zKR2cWKM2U q80VaYYQXfpkSuFZnNxb+BdwewiZarlWTZflbCj1XfkZsfXxJ+PKQImuAXpg3tts9+me 2bN/aJ3zOEgFodr8gJv6wxwXwEzz6uXmjBscRF+YYR9Dq8Zv3tvBA5fx+0Xphb+zZkOY sdcQ== 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=rCniWRlAzW7All3qxkRK0V0ixT5nOcHaARL4AtlodVwA3ccaHZMaK8qv/vzzXj4CSu jQwGxNORo/OrTPNQ6OGXSVMi4oqtQ9AhOPc/U9t6Jwd/KusLMlQXxxxBkAIr387iMHYB M9bVr90uNaIwNh7rg9Fl39EY+9FTkJs27Qvuvi5In9IvsBgjMTA8UP2nb5L1FApQzw7v 9tvzJ1KzBu6yUPJBtquNrBE6sTzsYJoC3CLKzkjeT98r32YO+Ry8IHdH9BnBI3/u/xbY 4o2ZSqVZWEEkUcjm8uJ3FiSrMz7DW6VoAkjZqymF0bGMDDp1L+zF4LKXhMFaK40ATVNw y9VA== 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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 i1si639007pgr.569.2019.01.14.08.37.07; Mon, 14 Jan 2019 08:37:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726783AbfANQfz (ORCPT + 99 others); Mon, 14 Jan 2019 11:35:55 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51789 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726750AbfANQfz (ORCPT ); Mon, 14 Jan 2019 11:35:55 -0500 Received: by mail-wm1-f65.google.com with SMTP id b11so223817wmj.1 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=ZtE5bFIaZfo2zzAu3kcV73UtBTHzAl/4UujX9NAYS4b8hvd/fo96sMsPI0l5Jk2zqO 9sMmZ4qP35FGYffM48lKfE36dJlDAfkFR1qbjdVcVX4jNkke4CP5YstIbFK/1GUG4tCK ufPxun3iLqnbmCD7CzyVlReZqL6OtslaFKhWwixontnttZsE7sV3ER/eSaaSCRr+jCSJ xlZtuW3roA7oruHhGHG+BOvV/AzZUVxrjBg+ZTHvKQya5JtYpTD21gpFALHFpvIm+5BU cESKDjKfq6i9FDRSDItCNqyChbQvLuzGPpJTmzgzaBa/RdLSgHFS6l9S1VLv2YfH31vY vImg== X-Gm-Message-State: AJcUukdCJdr1n0c3IK4o5QqEVMQiimS42s0AIganv22GqFH6hxR95+N+ mIlO7HUMnK0C30Mi9YEFE9chFmVBZA/P6Q== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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; -- 2.17.1