From patchwork Mon Jan 28 06:41:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 156694 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3087673jaa; Sun, 27 Jan 2019 22:42:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN67EcENQGz2NJ2c/wSAIy5J3hmbxjz2/qNPuZN6bdjC2eyCnm+XJ0g/McAX5yFejqqKdIdO X-Received: by 2002:a63:8c6:: with SMTP id 189mr18864518pgi.322.1548657729541; Sun, 27 Jan 2019 22:42:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548657729; cv=none; d=google.com; s=arc-20160816; b=vwNEIPZJePGe1fadwzqN+aMoCGCLAgYKxTZeVF5bhBVSbXYjCJfmCnUak4D8udwEPi hLO/Rpg/urJnl9G5A9+NVLknOURaa0mKRlTwAiVwb0cqBEWMauTu2FcKPEOMm+Ekdgon 5hgaH6KroAfJRdL1E6c0zCCwEaXXYzcNO/xmzqGHu+R/gKQtqrKbsyJPTQMarVhOlUF5 kU/1lxePtjpRmoPm86TTqEQtOI1m/D4GF25M3Ep4CJuxibZlgq91Ee+avcRRtLY8U0P1 fouCed/p0eVfAwXEApomD+sTyzGTZgz1Yl9KbOICsixkQcxPME+wfO/O+BupvkwQqWjR r3og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=s7lgGPNmk6yzNikPOAgazA8H44bs/2pQ5Wgm9TQ1twA=; b=Rqx2NFzJjUwPKdY485cne0J8CMPvD7ZDczfUhrL12rUWUl1OQVPytUa5BelYPwSnBx LjKccTMzNzUx2QupRXNb4SIwFypZJCo068OIX/9y6/sTxczz+cen+mrhx7F72z0YkhGk 9AW+zdZ9pq1KRBGcE09iEZo2mu5nA/wlu3ak/okPRadVwhnpLrnBUgrqdXQyBkESv7qd 4cI4EcJ3hdvIj1lPiGEKQNzc50aR+Y7TN8rPxxjiRRvfvBfMu2oAc/gG2X6aODS+kllV RvngskaGUcytzpOupNKiWmL+tOTSjjVRYUAZAi1HnLilOwVtjMUVitDZbydEKRncNs4p XD1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gjN/9A4y"; 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 b18si31396771plz.105.2019.01.27.22.42.08; Sun, 27 Jan 2019 22:42:09 -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="gjN/9A4y"; 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 S1726620AbfA1GmI (ORCPT + 11 others); Mon, 28 Jan 2019 01:42:08 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55329 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbfA1GmI (ORCPT ); Mon, 28 Jan 2019 01:42:08 -0500 Received: by mail-wm1-f68.google.com with SMTP id y139so12573103wmc.5 for ; Sun, 27 Jan 2019 22:42:07 -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; bh=s7lgGPNmk6yzNikPOAgazA8H44bs/2pQ5Wgm9TQ1twA=; b=gjN/9A4yevg58U7HPgUuet0K8raeSd4xai9sQWAx/DEtA2Vhcd4oB46FvobTC4vGve Jy7ZeUMxIZBlx30jMeRbySIQ6KYpmVZgph6e9Ps0skU2XViWZw26AJhOBjZl1H73EpdT cKCo4VY9DOlrx+stQcL3r0c4ae0zEkgnrxWMc= 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; bh=s7lgGPNmk6yzNikPOAgazA8H44bs/2pQ5Wgm9TQ1twA=; b=GgmZVLIG1DuStLhc4mPtVlm6OK4bXJ/qb5Ao1fsY+oA6ydCq3juZwkMFFlxXUDYBgr gezG45IKqPf9nhpLOu4zqVwQ207UG3mgTu1zROTGIZ8i1tQHf1cBCbBSn0eoGlxdLcCe Pm9DPt5xjm+6GEO55sMJtUngPAe1hx4bA+5zHD3otjFJAbHyEVUJFZxyHZSyod1ekVqN OKmzQcVRfCDC/D45IIEahpoOisTOBa74k+JIL9j6QjwfBa7Uij5kYI5Y+vKHIZl/Ff3w CJPN4MIzY61FHeGKJNKLCX1HsP5v4nZNVHtnZ9LCcJoGEaAAqaVoxZ/J37pVmZOb2tbQ uKXQ== X-Gm-Message-State: AJcUukeb8U5A6k5wp+2jAr0ecs/2SstpzT4UJ0aVfnkFPTei8l3ymum9 O2Y8EPUjOa8/p1nTOdIFfEpWnA== X-Received: by 2002:a1c:9ed7:: with SMTP id h206mr14803086wme.28.1548657726247; Sun, 27 Jan 2019 22:42:06 -0800 (PST) Received: from localhost ([49.248.191.44]) by smtp.gmail.com with ESMTPSA id t4sm86845856wrb.64.2019.01.27.22.42.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Jan 2019 22:42:05 -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" , Daniel Lezcano , Matthias Brugger , Sudeep Holla , Zhang Rui , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-pm@vger.kernel.org (open list:CPU FREQUENCY SCALING FRAMEWORK) Subject: [PATCH v4 0/9] cpufreq: Add flag to auto-register as cooling device Date: Mon, 28 Jan 2019 12:11:25 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add a flag for cpufreq drivers to tell cpufreq core to auto-register themselves as a thermal cooling device. There series converts over all the drivers except arm_big_little.c. Tested on SDM845 with the qcom-cpufreq-hw driver. Only compile-tested the others. Things needing fixing (but not a blocker for the series): - Look at how to detect that we're not in IKS mode in arm_big_little's .ready callback. Chnages since v3: - Got rid of wrapper function to register/unregister cooling devices. Directly call the function in cpufreq.c Changes since v2: - Get rid of #ifdef'ery and let the pointer exist in all cases - Get rid of (!CPU_THERMAL || THERMAL) dependency in all cpufreq drivers' Kconfig Changes since v1: - Fix compilation failures with allmodconfig - Get rid of #ifdef in cpufreq.c - Removed miscellaneous patches and sent them separately - Merged patches 1 and 2 from v1 Amit Kucheria (9): thermal: cpu_cooling: Require thermal core to be compiled in cpufreq: Auto-register the driver as a thermal cooling device if asked cpufreq: qcom-hw: Register as a cpufreq cooling device cpufreq: imx6q: Use auto-registration of thermal cooling device cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device cpufreq: mediatek: Use auto-registration of thermal cooling device cpufreq: qoriq: Use auto-registration of thermal cooling device cpufreq: scmi: Use auto-registration of thermal cooling device cpufreq: scpi: Use auto-registration of thermal cooling device drivers/cpufreq/Kconfig | 3 --- drivers/cpufreq/Kconfig.arm | 5 ----- drivers/cpufreq/cpufreq-dt.c | 14 ++------------ drivers/cpufreq/cpufreq.c | 9 +++++++++ drivers/cpufreq/imx6q-cpufreq.c | 24 ++---------------------- drivers/cpufreq/mediatek-cpufreq.c | 14 ++------------ drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- drivers/cpufreq/qoriq-cpufreq.c | 15 ++------------- drivers/cpufreq/scmi-cpufreq.c | 14 ++------------ drivers/cpufreq/scpi-cpufreq.c | 14 ++------------ drivers/thermal/Kconfig | 1 + include/linux/cpufreq.h | 9 +++++++++ 12 files changed, 33 insertions(+), 92 deletions(-) -- 2.17.1