Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1317909imu; Wed, 9 Jan 2019 16:03:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN5+0dvOK9gekA3f371HG/LhXDLLaPe9/O36lWoFbk1uvRGxc+JotSWsqY/qFmO7LYwEm/wk X-Received: by 2002:a63:f201:: with SMTP id v1mr6826549pgh.232.1547078597391; Wed, 09 Jan 2019 16:03:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078597; cv=none; d=google.com; s=arc-20160816; b=Ka7I2o2aojHzwYI7Jk+z2IXlzjaKCHEY0GdaRBaNf9pa7lpC8UYwHKj/mF3FlxoYyQ vtPZPGU0roo4+e/SP2JypYiGGaPg3RqFq/XL9jWPo75jD4jNxhHU2HnCulceiQjmguDQ X+72aNGOo5HIe7d3/yFJcurM+tBdRZNn7tLjtIf1zifdczUoun66q8K6VIIYJcuRM7rQ o3WF/IwMQVUYAAoNG2PRECucJEqGV9t8C2EoqWMd4bgg8LB+OFeZptBhu5pViBY0N4LR K/txfkGg9EczE8N/btLFeczmaOqC3KoOUkw+kgWhPUCymNAiBKDC/DUZj6mrJ1t3Vc/l mG6Q== 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=ImEURiP2L4BMNIwYvgGfi+iiHRWaE3cLPeN6j407nyvHRDmSlyhhkwVMtIuViviJE8 nfupeRaUR2PRapmj2a/Qff0eAzsvR7EcDASA3PfR4f3b4C2w6YZEUmO43s987btEUhzp 6fiZua/fYvyrM36soj6ztQdkXWoVQXI3xYtEE0hHL87hkOjx422MoQC/CkG8J+bA0U34 sozVPse0PRIcUvYqhIyf9BeuHXqWKRDX5Vmbd4D+vk9luY8/+do0l2wKS85otYznYua2 A2GSTaeD/QeSg6s4vHeOgerZ4/EHcX0qUt+MsJ9utBL2RLQP0kdMRR/RxkB5IQ3a52ln 5uNw== 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-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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w185si26395516pgd.518.2019.01.09.16.03.02; Wed, 09 Jan 2019 16:03:17 -0800 (PST) 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 header.s=google header.b=ZkBPYmqj; 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 S1727033AbfAJABi (ORCPT + 99 others); Wed, 9 Jan 2019 19:01:38 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46738 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbfAJABh (ORCPT ); Wed, 9 Jan 2019 19:01:37 -0500 Received: by mail-wr1-f66.google.com with SMTP id l9so9408380wrt.13 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=JBZCvvQph9UT59NOvcglpfMQVjochi0nU2gQ0VGWy/9IHTJTcsLVUFeqYqvmJba+DQ VWQlamXwnKo28XK1GSp0+PFpthWsqijrHAWz7o+U1y5holZt5SaomuIT743MWGOkh+zz dQRIv+VKshvIUoZSFzPCtSUe9TfX5Mkd7SalyLpbRq3kMF3hr7h6K+qphxPU2pbFn7qj KQVmfU2tYeX+B7VfsPFpQlA80l7Zn9tjky6I9IoAGQWf60+9HIcYjTLb0esvS0VCFKtM vmlDzb+AVCcCoB2nGzAfxtCtRNIFF3pEFwmL5JNKTnsJew73uwwMdPalAle/dHspID7e 1P8Q== X-Gm-Message-State: AJcUukdIU2Q6w/L5Nwa/JTSRfnRTVytDghxQCOV5/XDJ5P0rsRFXflVs 7HXQcgQWpNnQQ/NFzZncLb7XRgwtDSA= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, }; -- 2.17.1