From patchwork Thu Jan 10 00:00:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155105 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281205jaa; Wed, 9 Jan 2019 16:01:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6B0sopziOZXarK8Jpg19eA/GXUGl64X9wDGrjP3cVIepXYxzskM0Np78lO2rfbbSblN5sM X-Received: by 2002:a63:554b:: with SMTP id f11mr5225569pgm.37.1547078479211; Wed, 09 Jan 2019 16:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078479; cv=none; d=google.com; s=arc-20160816; b=g/B7Y+OobqNrkZvdw73cKcckugnX121pMleqmdsExmZsZ9JfauJv6RDxhiLONplkbk wtQ67GtNdeE53xIRhUWk4of1eSuubwXowi7BOmiba+GkADdlmdKh/qTEAJJT4KCA92x/ /bh2+O3/TmKxUPQQy649QDlO541ij14KQivwPkB9IIA48gPjwSxiZ6bGKZ9mDRSjvpUY QKi7CYUoToqcTLtNps+JvzzEMpJQ8e74NPpt5+nG3PU4e7MGVdKqsiKICBkEndNAMB+f /23tjn649TKbv/7pvqUMIY6tMgXvVdkpW/ZEAFSwaqSNq7dcIQncXprqygiSCOnDpDIX sFeQ== 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=TWqA5aCCzVWoclWoRERTw4sDZ/VsY8UwV8+oCN/rO9o=; b=pFPFqphWxH1MSIdUpTdV2ZHRXlvbCKCTQtENi8VD1GbKR69LERXhIUy0Kqu5BVE0kz CEqZU2hKNTmrt4yKfeb7cey8xrhLSOGPLY2dVcjk733dZlaDHlSOnbS1x4oxdn+i54Ge OYPrr4/tZW7jEQPPtLthS3NM6sBfoyfzQnGZ15kwvhGv3YWq+9kNrf4XEjoWbeijAX+y M3qv+JK2Q5kCxWSC+uWnJQwnnG4vXMcqFFwnmYjSH7wF/gn0Lo1AWnFcsNb4hTi+HC0S IjtYfuhC9exoI8PF2rplaXsF4FKDwlWPQicXby3gCgPdGXXITR/GEkXiPAgJmVTOqr5D yNTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T+d45++X; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 m15si15318329pfd.3.2019.01.09.16.01.18; Wed, 09 Jan 2019 16:01:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=T+d45++X; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1726286AbfAJABS (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:18 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38287 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726624AbfAJABS (ORCPT ); Wed, 9 Jan 2019 19:01:18 -0500 Received: by mail-wr1-f68.google.com with SMTP id v13so9448302wrw.5 for ; Wed, 09 Jan 2019 16:01:17 -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=TWqA5aCCzVWoclWoRERTw4sDZ/VsY8UwV8+oCN/rO9o=; b=T+d45++XscdlCHWCAsA9SD95Y4D/qk4Cu1eJmM50dW38fYpqhoIf9X3ShJ+GkenZV0 Qbev/fc4EiHLNYKs9WgVT/++JitLGeooodqcyzIcZrOC/12SFxVWMxpMhnUc+VGHV70e o1OWQUlBd5NGbQlwqS2lxTOlL3Ds9vkUv2AZo= 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=TWqA5aCCzVWoclWoRERTw4sDZ/VsY8UwV8+oCN/rO9o=; b=fsdU/avH7BXphCWNcBdQdUWobBWoxqTh9iz9pknlPe3Wy45+X1YleZxBz0rGN5yxx2 EiUHaykI1yvJigvWRsZY6S3IJFR9zveET8o1cYj31L04Ty7ysjXzi8PTQcsj6MRKcTJS ymR4fvYRXaBDCrhYyhPjUqvCSDGJ7/1ZryXYHJvBuxisG9y4kkc2dXLdo/5SXNX4WwE/ D/KdtpsSEvnlo7NqDSf8IeobHAVgqRraDdrL4oiWjP4RRz3Z5DWiyem49Nyppg0Z4utk gUXXbEOc5WH8XUvyBWY69zFqiAQeFw0xkRSIlEb4RE5gz9SUR8R9YZRMAoJNd+CPh+X7 HP9Q== X-Gm-Message-State: AJcUuke+hPKgCGa/b+zqUXu9QlnEcWQk1hb9F/+zm9FqabIzqOURIht2 LGG5TgW/jGVvbCr21NEy3XoZpw== X-Received: by 2002:a05:6000:12c4:: with SMTP id l4mr6662240wrx.134.1547078476478; Wed, 09 Jan 2019 16:01:16 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id a12sm63151563wro.18.2019.01.09.16.01.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:15 -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 v1 2/7] drivers: cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Thu, 10 Jan 2019 05:30:51 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..2496549d7573 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,8 @@ struct cpufreq_policy { struct cpufreq_frequency_table *freq_table; enum cpufreq_table_sorting freq_table_sorted; + struct thermal_cooling_device *cooldev; /* Pointer to the cooling + * device if used for thermal mitigation */ struct list_head policy_list; struct kobject kobj; struct completion kobj_unregister;