From patchwork Mon Jan 14 10:21:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155425 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3489299jaa; Mon, 14 Jan 2019 02:21:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN4uAWwihWt4H0CiNiNzZF3SsivXV+xpAHK/wdIXEE24j9ldKJFe6TJlm0BMKVbzjAEjk+u5 X-Received: by 2002:a63:4e41:: with SMTP id o1mr22666194pgl.282.1547461301151; Mon, 14 Jan 2019 02:21:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547461301; cv=none; d=google.com; s=arc-20160816; b=bwif5rtLKAigEOTWvxo0LPJ1EVu3ONalAZa/SIqV9uCo5slIlKbioecSr8RGqb3abh 27Px81MpkFA24TIn6nW3j28Rwn5ZAylCxmCDCgH0IybKqp7w47dIZOwV3BwjFe6aGFR7 +Il8OGXAbp/YXJNtE5rIRYi8Lt2kdhwjFPcW+ZPCYz3xwDANV7F9X8HKVTr8rb+aLtnA 3y4iWO3dEEbicXRd9zarirw2ikCJ+nxydP94DKgs4yXIHuUNl1qwVKDM7rGgTE/Di5TB 87ABsK0acUEuel5a3Sf5wpdQiT2uUZKuNKfSM6Bx1uaw8sq/ZvxQ2aYBP4sc/m3Ps8lM Wh8Q== 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=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=xswzlUkOjN5Xf39aQqaKeQ3Qpo/YfyYWXyhFo57ZHkU8Nonsp8LVoOsptVd1l82R3E scQbqP31CdEJJSqBY1djaZf8pRd40plL+z3JNg7pV5xQ0E1pyaFCHUKLFO6mk63CPgnU di0I+L7hiXmQmVrNMx+fJPOtyw8rsLrYcyl138Q4PQvtXB0mZ/0CPLgtAiNQj2SY8Esu pZLzTeGZAtGw6eYf0EmTZYsURa305YxZwn2UYQi+X8uRYkJxllbMNxU+cL2/eL38AJaJ HCSGW/qkjagRhj78BWp0Ya3p5aE7XbiF+xVcYod1k/o9MGthtKx3brUD7bHJ3BfoIpTF 5CHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZfPUQzxz; 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 bg7si20299plb.149.2019.01.14.02.21.40; Mon, 14 Jan 2019 02:21:41 -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=ZfPUQzxz; 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 S1726766AbfANKVj (ORCPT + 11 others); Mon, 14 Jan 2019 05:21:39 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37260 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbfANKVi (ORCPT ); Mon, 14 Jan 2019 05:21:38 -0500 Received: by mail-wr1-f68.google.com with SMTP id s12so22163603wrt.4 for ; Mon, 14 Jan 2019 02:21:38 -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=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=ZfPUQzxziYUzsb8yM368ueLuq8ISb7GvH6YdC9XIQEtutmz5I41/tI3dFA5e2RwFc7 GYkI7+V9hD0yfBKSpI6lHiq4ZPxwtBDFQ8TDBBXW9ENe9G1yDPZ5uLMzW3jDWSP2sK6Z uP0Djba+mAuFnqCUqls4txjXp6QmOcpCWPogk= 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=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=lrpFsB7Aikal9+3zHWGqTIOl8YqWZM0tuZUuDuK0oBZfg5VlsG/vEwLdmF4iDcCAvd tKT2iYpNkP6lcHQyZSGFrES2R+gZUvIBDpxWO79fEUyE4n1HH1eNP8XJ1xurgIRhaFli qcCID4UAOyRzh+A/dFftIEs0bQ55SHc+4597S8/eIEIXY9pxR5WlW2T9LgTjj8kfSJPD AYD2x4mLQVNdqEgMsXN4hitHzADYOCKg+mw10Ekx1ooZvJP2VHnxV59qdsMtFo+U3Vgz Z2Eviegjkold7iURA7Sdo5rfJ3cYnI1H2MdJtnP/dgDRqQ4YMS7tbg4dIrvVFog/DFki qoTQ== X-Gm-Message-State: AJcUukd+gdrvHuiG36t2UtfsApKUOcPW7NR+zF+tUAVczErnOl4VEVjN GFIHP0+bUoUe2QiL4G0h8pP4NQ== X-Received: by 2002:adf:de91:: with SMTP id w17mr25144412wrl.320.1547461297218; Mon, 14 Jan 2019 02:21:37 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id a1sm63729951wrw.76.2019.01.14.02.21.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:36 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 3/9] drivers: cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Mon, 14 Jan 2019 15:51:05 +0530 Message-Id: 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. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 Reviewed-by: Stephen Boyd diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..9fbc1d996967 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,9 @@ struct cpufreq_policy { struct cpufreq_frequency_table *freq_table; enum cpufreq_table_sorting freq_table_sorted; + /* Pointer to the cooling device if used for thermal mitigation */ + struct thermal_cooling_device *cooldev; + struct list_head policy_list; struct kobject kobj; struct completion kobj_unregister;