From patchwork Wed Oct 30 22:52:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 3117831 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C73F4BF924 for ; Wed, 30 Oct 2013 22:55:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 533A020411 for ; Wed, 30 Oct 2013 22:55:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A003E203F4 for ; Wed, 30 Oct 2013 22:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754731Ab3J3WzN (ORCPT ); Wed, 30 Oct 2013 18:55:13 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:59507 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754583Ab3J3Ww2 (ORCPT ); Wed, 30 Oct 2013 18:52:28 -0400 Received: by mail-ob0-f169.google.com with SMTP id uz6so2235074obc.14 for ; Wed, 30 Oct 2013 15:52:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=jyXBGnLx75XHvaLI3T00GV625xcXHgEJpLLcKjgPtJk=; b=AqvDzpmPEs9fuo7u9OFuYfoECshPC30/HqeN1scrW/wiQEIkWSxbRLUknEgpJ6MDjW 1VxV07LHI7Czed4jrCWoMh/DBpoiyQIyqpiLmlKyaFEUu2Luibh+o9vP45XFjZaKonk4 tGxYm6LlY1JTVPEEceHZSVsJZAhFf/9x9tRqSuNgpV5QITMUyGfciKAd4wnwXTQCkKcp R1u3nHDrGD3/gkUe4qoB6nzNGfuRmxHPyZd1Jk+TMlptrjlh2TvyfG/o04SuEgSU0VeT 3MAlQgCaR9ETZqmPsBCYt+4OSektUd2OrJKsDdwpEkdUsM8bwgM0EbhxCinqdpBZtb9e oj7w== X-Gm-Message-State: ALoCoQlDnV/RJ7UoXoATp6+v4J4jwTJ36jJr0p0BkYZ9TDZTyIPfGIu8amOnbun2eA74l6kRn+7Z X-Received: by 10.60.58.166 with SMTP id s6mr113926oeq.40.1383173547818; Wed, 30 Oct 2013 15:52:27 -0700 (PDT) Received: from localhost (sccc-66-78-236-243.smartcity.com. [66.78.236.243]) by mx.google.com with ESMTPSA id j9sm710082oef.8.2013.10.30.15.52.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Oct 2013 15:52:27 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, viresh.kumar@linaro.org Subject: [PATCH V2 Resend 07/16] cpufreq: imx6q: use cpufreq_generic_get() routine Date: Thu, 31 Oct 2013 04:22:05 +0530 Message-Id: <7d719cd3e73f6acc0e27a9b8bd2efdf295350b96.1383173230.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We have common infrastructure available with us for getting a CPUs clk rate. Lets use it for this driver. Acked-by: Shawn Guo Signed-off-by: Viresh Kumar --- drivers/cpufreq/imx6q-cpufreq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 4b3f18e..eacd785 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -35,11 +35,6 @@ static struct device *cpu_dev; static struct cpufreq_frequency_table *freq_table; static unsigned int transition_latency; -static unsigned int imx6q_get_speed(unsigned int cpu) -{ - return clk_get_rate(arm_clk) / 1000; -} - static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) { struct dev_pm_opp *opp; @@ -134,13 +129,14 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) static int imx6q_cpufreq_init(struct cpufreq_policy *policy) { + policy->clk = arm_clk; return cpufreq_generic_init(policy, freq_table, transition_latency); } static struct cpufreq_driver imx6q_cpufreq_driver = { .verify = cpufreq_generic_frequency_table_verify, .target_index = imx6q_set_target, - .get = imx6q_get_speed, + .get = cpufreq_generic_get, .init = imx6q_cpufreq_init, .exit = cpufreq_generic_exit, .name = "imx6q-cpufreq",