From patchwork Thu Jan 10 00:00:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155108 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281515jaa; Wed, 9 Jan 2019 16:01:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN7uE8gk2upWeHuTGCfu8/4sswPuPrlq7gjW+G389ncR02XjU2KJTSE7CZvwnYcF/0kDvpii X-Received: by 2002:a17:902:820f:: with SMTP id x15mr7758239pln.224.1547078497355; Wed, 09 Jan 2019 16:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078497; cv=none; d=google.com; s=arc-20160816; b=kVGPia8M8LwR3LdppvRBJMSxrOX62SuIr5D4/iMPahPocl9nK8PoZyOn8fIYaXb1H6 0ZyxxNbJkwkrUjWm981437YjXIjiHS8xFtRIm8bQTn5E0tE+MS0AFtO189ymxtSICR7t sZ9ITVFHiseTpqVaPYuxHqWpAj38eBRmxBwHiB3ULPpcs0DJhZVJxEb7K2chD3vJMtbD 7nB0ZHdugCaUAUC1bsq8N8/UbQK8bszi8/Dy7DIzN/QD1tI9e1WVy8tW+Jpo0acDAymW dL8Jm+HpWtLY9nQxsykkY2zrHlL2M2y9mxtrdsDWmaGfFOwZMOLQnKqPwfxJ2wpwxzFz T13Q== 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=90uAdP76GbEFesAg3EEdgboTHiHbKzIpz1LIUUCK07I=; b=a0/6oCjxvjN+VirPaV/J2KTpHIPQadZaqX/bPqcgtiZG1g2D/RZeySaoTAjkgaNizF DvI5bw2vhsR6O3Sa72lettoeDfFeMIzX8Zb4vLQV6Sxe6vUhhqnYyhX+fx25bhJJB0XF wGJP7e0RZu5Gkm74U2/is16iGdafvQbTOb7jEy/KvnW70br08rOAx6ZZX0b3uO+mIHoC y/MVEkNU8076vBDmIGlbqI6l0Ehkoj71T6f3ufPMk80K9dIkV/lbwIana/bjnxzKfAH6 FbgmX3JVf/DEEZiab50oiOk4KSptZrOlcudbdWR1kgnbUuxy0pAHtKM8aQhiHgsFuIgw SQ0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZkBPYmqj; 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 c8si8616063pgl.507.2019.01.09.16.01.37; Wed, 09 Jan 2019 16:01:37 -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=ZkBPYmqj; 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 S1727015AbfAJABg (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:36 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40911 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbfAJABg (ORCPT ); Wed, 9 Jan 2019 19:01:36 -0500 Received: by mail-wr1-f67.google.com with SMTP id p4so9452687wrt.7 for ; Wed, 09 Jan 2019 16:01:35 -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=90uAdP76GbEFesAg3EEdgboTHiHbKzIpz1LIUUCK07I=; b=ZkBPYmqjsKFIzsQXjpWY1Wnu7EovFBLBDDfslZ++FU7hV5yg7rmMfLvgqlg1Z+xByy 2txi6kKKAwy59nB7kwgIfqvZpUlWM8+FbQB4QTFb9BuCo04EdmGEJ7qdYlNgzYd+U8Fh oV0xgi6jLnwahRIltAtaAQTCIqzz5toPUgzp0= 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=90uAdP76GbEFesAg3EEdgboTHiHbKzIpz1LIUUCK07I=; b=Y/p7+5/NnwfakPrWoqL+FJimcTUWceMmlEk2XqvMoF99BTrxDa56d7/a/mkAbuMLV8 t2XmLaxbqpgjkQv1ZRNqViaNgLH+NxdatWlL3hJ7t2iJVazqwPhHiKpdHnr1zgFvMv4F kGz4GN8HW5+g3wn92JzAcL4UOqCvly9S+DY064sona/kLnrqyYD4YldPjImz9QJQhOfg aOaESdnGsOnW98bN5tJ9JNmS/PzByNU3L7Fbn1oWI7Lzy7N2g+4rh3C6IWn7qF4nMgO0 /bYmswLUWIBZG/+uhrH5uMGJmDlTWUBkqIVe9paL2rPQ3MB0musmVgpr4FY5zgCc+mXi lGEg== X-Gm-Message-State: AJcUuke/jlPayN0LuAP6g8ZJBin5GAtRB9V7n9iRzq2iaTMYiPKYHb2E opN4CkzL28tRZiI/45Kw9RDlmg== X-Received: by 2002:a5d:454f:: with SMTP id p15mr7289952wrr.39.1547078494622; Wed, 09 Jan 2019 16:01:34 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id s3sm12839428wmj.23.2019.01.09.16.01.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:34 -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 5/7] cpufreq: qcom-hw: Register as a cpufreq cooling device Date: Thu, 10 Jan 2019 05:30:54 +0530 Message-Id: <3c7d0e4a8373e89d6922543ccf56749970de5567.1547078153.git.amit.kucheria@linaro.org> 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 Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 649dddd72749..1c01311e5927 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -216,7 +217,10 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) static int qcom_cpufreq_hw_cpu_exit(struct cpufreq_policy *policy) { void __iomem *base = policy->driver_data - REG_PERF_STATE; + struct thermal_cooling_device *cdev = policy->cooldev; + if (cdev) + cpufreq_cooling_unregister(cdev); kfree(policy->freq_table); devm_iounmap(&global_pdev->dev, base); @@ -238,6 +242,7 @@ static struct cpufreq_driver cpufreq_qcom_hw_driver = { .init = qcom_cpufreq_hw_cpu_init, .exit = qcom_cpufreq_hw_cpu_exit, .fast_switch = qcom_cpufreq_hw_fast_switch, + .ready = generic_cpufreq_ready, .name = "qcom-cpufreq-hw", .attr = qcom_cpufreq_hw_attr, };