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: 10755023 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C62A46C5 for ; Thu, 10 Jan 2019 00:01:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1113286C6 for ; Thu, 10 Jan 2019 00:01:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2CFD29354; Thu, 10 Jan 2019 00:01:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53805286C6 for ; Thu, 10 Jan 2019 00:01:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbfAJABg (ORCPT ); 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-Google-Smtp-Source: ALg8bN76mugbeaKFTbT27CH3H2EhGoAIgSpA1FnV3VhZ/tjjiPfOmGjwaXzc6O4gg8MdBcTU02sHmw== 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 X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 5 +++++ 1 file changed, 5 insertions(+) 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, };