From patchwork Fri Aug 16 02:25:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19182 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 02BD02486D for ; Fri, 16 Aug 2013 02:27:02 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf1867928ves.6 for ; Thu, 15 Aug 2013 19:27:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mmiPEratQDstqd8ktenRIdwmYaLb9fITnxnlJCpO7SE=; b=Yme26xerjMWRMFVAOjT8TUxnmrKV6pEBa/5D31f1/VzF9q5BCcdmGAaW8G6y8/96He RcuaZ4uR+V9ODYNIMcY+2HyQPc8BgJM65BVNcqoYuyIRKINvb9Rk3T/+Q7ftlvPDaKOS RLIbciMQaTi3nzaDDuUugXUynEzu9Hp72UoEY6RpKntQoUHqZCIygR4gEvkrM2V/JPaX 7ybZxy03kIixKsP2KanFUODjlzIYodlZ42w0qXZgFOCyGzlAUQH07P3WdN5OC6NiGBjp MCPt5zvfxq8s4rLfBYUi9rsu8+vC6CPXUXEt601u9rKKezLLamPOy7Mp5gJjGroZisi7 5MSg== X-Received: by 10.236.63.165 with SMTP id a25mr344920yhd.43.1376620022638; Thu, 15 Aug 2013 19:27:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.231 with SMTP id y7ls649436qeu.39.gmail; Thu, 15 Aug 2013 19:27:02 -0700 (PDT) X-Received: by 10.220.82.9 with SMTP id z9mr11334109vck.0.1376620022505; Thu, 15 Aug 2013 19:27:02 -0700 (PDT) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id st7si691020vec.87.2013.08.15.19.27.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id x16so1218539vbf.38 for ; Thu, 15 Aug 2013 19:27:02 -0700 (PDT) X-Gm-Message-State: ALoCoQkSF0zehJOC+3YVooeWi2maC80Twh5rYIhBc7hoAoHAQ9mzzBFSqkcciJ49pp1FlJWt63Oh X-Received: by 10.220.91.16 with SMTP id k16mr17512742vcm.21.1376620022233; Thu, 15 Aug 2013 19:27:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp45165vcz; Thu, 15 Aug 2013 19:27:01 -0700 (PDT) X-Received: by 10.67.3.103 with SMTP id bv7mr681147pad.15.1376620021120; Thu, 15 Aug 2013 19:27:01 -0700 (PDT) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mx.google.com with ESMTPS id cr3si1728040pbc.110.2013.08.15.19.26.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.169 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.169; Received: by mail-pd0-f169.google.com with SMTP id r10so1602163pdi.0 for ; Thu, 15 Aug 2013 19:26:57 -0700 (PDT) X-Received: by 10.66.4.71 with SMTP id i7mr607168pai.82.1376620017720; Thu, 15 Aug 2013 19:26:57 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qf7sm98613pac.14.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:26:57 -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, linux-arm-kernel@lists.infradead.org, Viresh Kumar , Linus Walleij Subject: [PATCH 09/34] cpufreq: dbx500: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:06 +0530 Message-Id: <6ce2b2cfc0c51c27ab27c4b4ff6d446debfd4dd9.1376619363.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Most of the drivers do following in their ->target_index() routines: struct cpufreq_freqs freqs; freqs.old = old freq... freqs.new = new freq... cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Change rate here */ cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); This is replicated over all cpufreq drivers today and there doesn't exists a good enough reason why this shouldn't be moved to cpufreq core instead. Earlier patches have added support in cpufreq core to do cpufreq notification on frequency change, this one removes it from this driver. Some related minor cleanups are also done along with it. Cc: Linus Walleij Signed-off-by: Viresh Kumar --- drivers/cpufreq/dbx500-cpufreq.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index d6d6b8c..060430c 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -22,28 +22,8 @@ static struct clk *armss_clk; static int dbx500_cpufreq_target(struct cpufreq_policy *policy, unsigned int index) { - struct cpufreq_freqs freqs; - int ret; - - freqs.old = policy->cur; - freqs.new = freq_table[index].frequency; - - /* pre-change notification */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); - /* update armss clk frequency */ - ret = clk_set_rate(armss_clk, freqs.new * 1000); - - if (ret) { - pr_err("dbx500-cpufreq: Failed to set armss_clk to %d Hz: error %d\n", - freqs.new * 1000, ret); - freqs.new = freqs.old; - } - - /* post change notification */ - cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); - - return ret; + return clk_set_rate(armss_clk, freq_table[index].frequency * 1000); } static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)