From patchwork Thu Mar 16 05:29:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 95378 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp660747qgd; Wed, 15 Mar 2017 22:30:47 -0700 (PDT) X-Received: by 10.98.134.142 with SMTP id x136mr8268962pfd.64.1489642247446; Wed, 15 Mar 2017 22:30:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b189si4145766pga.296.2017.03.15.22.30.47; Wed, 15 Mar 2017 22:30:47 -0700 (PDT) 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; 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 S1751647AbdCPFaf (ORCPT + 25 others); Thu, 16 Mar 2017 01:30:35 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:33441 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbdCPFa1 (ORCPT ); Thu, 16 Mar 2017 01:30:27 -0400 Received: by mail-pg0-f48.google.com with SMTP id n190so19664776pga.0 for ; Wed, 15 Mar 2017 22:30:26 -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=Y5jC4GCSRcDXFla0kPizwgNK9f6rto5AXsrUp8yvvqw=; b=jlESVRsZYg1TN/GB7Ec4UJYkSMyM3UI8LxIrT+02NSuLbgzRkszseArky9R2beTlGh cwlEtGPxA2N1mmMuxR7W5gC1UABDeo1+hD/xaGL5Jji3u703TGZFsEJ2DOiWwLBY4QfE 9cybgW//WFgsE2mUhkzDVolwzyeHAgOij1274= 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=Y5jC4GCSRcDXFla0kPizwgNK9f6rto5AXsrUp8yvvqw=; b=Toiv2iwyqz+mvCFjCjpAd/6LBSM4UKA3euibJhrMqKKSMDvtxWYHQmfefNyT2yg2kd 7pSvKxF5nyrQFgFkFO6XL2Tmi+AB30mug0+TPqg0n4iTclcEckwiGe4M7I1hWUMzll/6 XTaDX46r/82prksRrFbLOg5WTV6yWLrxNKi9XTPzrI/6dt4iAeeZtqOTi8gXi+2rqz2C cwdP+r9RQVpVvwuLceTV11FgF1qMdQjFEPAza/chIm5bcmZQ4irB4k/LL7kv2794pqGA pQCcG7rdTVKMFC8wC8bEaGYmmOF+TVb8rrbFOB5PeZFl/i4i3DcQGF3Y4Znhtv8Xxkfz Lftw== X-Gm-Message-State: AFeK/H0BqZnc070how7vKLD/nX4WBqpMBZDmfcoCJTMadLNJKBd+g0SxgdBhf2K3/JoTVLmR X-Received: by 10.98.89.139 with SMTP id k11mr7898320pfj.196.1489642226015; Wed, 15 Mar 2017 22:30:26 -0700 (PDT) Received: from localhost ([122.171.239.200]) by smtp.gmail.com with ESMTPSA id d63sm7394484pfg.132.2017.03.15.22.30.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 22:30:25 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Javi Merino , Zhang Rui , Eduardo Valentin , Amit Daniel Kachhap , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: [PATCH 09/17] thermal: cpu_cooling: store cpufreq policy Date: Thu, 16 Mar 2017 10:59:44 +0530 Message-Id: X-Mailer: git-send-email 2.7.1.410.g6faf27b 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 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.7.1.410.g6faf27b diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 2c169fee693e..7590279bf1de 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_dev->clipped_freq = cpufreq_dev->freq_table[0]; cpufreq_dev->cdev = cdev; + cpufreq_dev->policy = policy; mutex_lock(&cooling_list_lock); list_add(&cpufreq_dev->node, &cpufreq_dev_list);