From patchwork Mon Apr 17 06:01:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 97498 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1212652qgf; Sun, 16 Apr 2017 23:03:31 -0700 (PDT) X-Received: by 10.98.150.211 with SMTP id s80mr10245914pfk.15.1492409011015; Sun, 16 Apr 2017 23:03:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si10024993plt.253.2017.04.16.23.03.30; Sun, 16 Apr 2017 23:03:31 -0700 (PDT) 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; 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 S932951AbdDQGDV (ORCPT + 12 others); Mon, 17 Apr 2017 02:03:21 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:36747 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932941AbdDQGDS (ORCPT ); Mon, 17 Apr 2017 02:03:18 -0400 Received: by mail-pg0-f48.google.com with SMTP id g2so67321019pge.3 for ; Sun, 16 Apr 2017 23:03:13 -0700 (PDT) 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=m18ZzdhPtd13lUc4s8u4z9Uul/OeL2k08NZLvcSB1bw=; b=H4LbZo/A5AZ3w3DzMPoC4EX/ln3z/tlQx3nFPZUUZHqvx16Zizu/YHFDvxCYHCo+nF PorrRZN3Fpq006SRrUglddikI+rJ+4/kQNtUWmePkLqj7j54loiJfS9qbkG3TfvYX4n9 cb6wC0j5xTC8d6mE0rGQ1QkECao69NcH3sJcQ= 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=m18ZzdhPtd13lUc4s8u4z9Uul/OeL2k08NZLvcSB1bw=; b=UGBhb6tbCZTOu8tlj2bbbKw00iu0aD1LondqVoyUit56mt5DaXChy/xGa07ArLaJD6 il87K4IynPlnqLK+K8yrg5BNwaHYJR/9hYyGC8yvU/qp96ID83PKEzaeY4HhoMK7oU/U /HPE6q7e61YYJfaBfLkX7vGB7JmAAuzdYG/7i4yiJHuA1ph2k/96Mf7mJVAACpNaPtCn C1EirxcW5aVaj0K51eCdKuYSr1lZ11uduzae7wbw3WuKaifIrG/9BSoRrKWx0UiazRGk YHqKD9jrAPungiweVeCDFIO/N+CW3B7C5SaWJpGeu95phsFNaBx50SEv1Vnejeq/2AZK Nldg== X-Gm-Message-State: AN3rC/7E/1Pt1e+J6urtyeQ0ccmt/gECF6EGC3AGZKVelhBW8twR1u2q yXwqj32fWX/78TbI X-Received: by 10.84.179.99 with SMTP id a90mr13415667plc.26.1492408993184; Sun, 16 Apr 2017 23:03:13 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id b8sm15375240pgn.51.2017.04.16.23.03.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2017 23:03:12 -0700 (PDT) From: Viresh Kumar To: Javi Merino , Zhang Rui , Eduardo Valentin , Amit Daniel Kachhap , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, Rafael Wysocki , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: [PATCH V2 09/17] thermal: cpu_cooling: store cpufreq policy Date: Mon, 17 Apr 2017 11:31:54 +0530 Message-Id: <43bc32f0c5fc796fd90f3c2310bb04a8226ccf64.1492408342.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 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 The cpufreq policy can be used by the cpu_cooling driver, lets store it in the cpufreq_cooling_device structure. Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.12.0.432.g71c3a4f4ba37 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 48fc5447bbf6..bc018c628c93 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -67,6 +67,7 @@ struct power_table { * registered. * @cdev: thermal_cooling_device pointer to keep track of the * registered cooling device. + * @policy: cpufreq policy. * @cpufreq_state: integer value representing the current state of cpufreq * cooling devices. * @clipped_freq: integer value representing the absolute value of the clipped @@ -91,6 +92,7 @@ struct power_table { struct cpufreq_cooling_device { int id; struct thermal_cooling_device *cdev; + struct cpufreq_policy *policy; unsigned int cpufreq_state; unsigned int clipped_freq; unsigned int max_level; @@ -827,6 +829,7 @@ __cpufreq_cooling_register(struct device_node *np, cpufreq_cdev->clipped_freq = cpufreq_cdev->freq_table[0]; cpufreq_cdev->cdev = cdev; + cpufreq_cdev->policy = policy; mutex_lock(&cooling_list_lock); /* Register the notifier for first cpufreq cooling device */