From patchwork Fri Sep 13 13:00:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20111 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 764DB20358 for ; Fri, 13 Sep 2013 13:09:48 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf1149402yen.6 for ; Fri, 13 Sep 2013 06:09:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=eVul1Ko5jgubI3g6s8GS2Wz29tQbdZkhqZAmLoDSXBI=; b=M5zPZiYUwQFBl15kdhNi/156uQyvGnWhhssJY3CnQ9dh5DBeE5rIPZXvYRt3gTyVHN f3+ZiRbDdktOVIz5IejJlVFC4EBSaAP0ZvFQC/fME1wd0HmtRV6WPzi4iybK0vN8ykLz aCb9NYuMGcQIKWaXpAez5Gwz30o6NIRh5LESwBoqL+DM6BsVdN4F9G5dapKfwRorkGiI vKN8sRjJncLl4ew/2CQBDPW81WWSkAff20EaFzdxTsuzTHykOIAMtKKnghL5g5Lo9aLW mpBCiyepCKZ607K01lGUmP83cgd8mbL2QHS4mx8NX/GKFJJn1Y992g3ISvRC8wM1a+Bj 8IAg== X-Gm-Message-State: ALoCoQnbKPzr3m9ARIPGsa+5f6y3L8IeNLCyObdGcDzo9gzeFCCP4Q+FQjX7Vitwj0OiIqlFb0sj X-Received: by 10.236.172.34 with SMTP id s22mr4928087yhl.25.1379077788209; Fri, 13 Sep 2013 06:09:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.144 with SMTP id u16ls1112477qef.84.gmail; Fri, 13 Sep 2013 06:09:48 -0700 (PDT) X-Received: by 10.52.230.74 with SMTP id sw10mr9673049vdc.6.1379077787987; Fri, 13 Sep 2013 06:09:47 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id k17si3112245vck.27.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so913688veb.39 for ; Fri, 13 Sep 2013 06:09:47 -0700 (PDT) X-Received: by 10.220.11.7 with SMTP id r7mr12004325vcr.12.1379077787857; Fri, 13 Sep 2013 06:09:47 -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 u4csp79785vcz; Fri, 13 Sep 2013 06:09:47 -0700 (PDT) X-Received: by 10.68.234.165 with SMTP id uf5mr13482713pbc.41.1379077786992; Fri, 13 Sep 2013 06:09:46 -0700 (PDT) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by mx.google.com with ESMTPS id xx2si11127452pac.314.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.171 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.171; Received: by mail-pd0-f171.google.com with SMTP id g10so1216770pdj.30 for ; Fri, 13 Sep 2013 06:09:46 -0700 (PDT) X-Received: by 10.66.255.10 with SMTP id am10mr2052576pad.165.1379077786596; Fri, 13 Sep 2013 06:09:46 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id 7sm17980535paf.22.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:46 -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 Subject: [PATCH 057/228] cpufreq: arm_big_little: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:03 +0530 Message-Id: <548ca171c8d04596fe22e8b98af24b28453e840d.1379063063.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.128.180 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 CPUFreq drivers do similar things in .exit() and .verify() routines and .attr. So its better if we have generic routines for them which can be used by cpufreq drivers then. This patch uses these generic routines for this driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 2c7c134..132c966 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -47,14 +47,6 @@ static unsigned int bL_cpufreq_get(unsigned int cpu) return clk_get_rate(clk[cur_cluster]) / 1000; } -/* Validate policy frequency range */ -static int bL_cpufreq_verify_policy(struct cpufreq_policy *policy) -{ - u32 cur_cluster = cpu_to_cluster(policy->cpu); - - return cpufreq_frequency_table_verify(policy, freq_table[cur_cluster]); -} - /* Set clock frequency */ static int bL_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -205,22 +197,16 @@ static int bL_cpufreq_exit(struct cpufreq_policy *policy) return 0; } -/* Export freq_table to sysfs */ -static struct freq_attr *bL_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver bL_cpufreq_driver = { .name = "arm-big-little", .flags = CPUFREQ_STICKY | CPUFREQ_HAVE_GOVERNOR_PER_POLICY, - .verify = bL_cpufreq_verify_policy, + .verify = cpufreq_generic_frequency_table_verify, .target = bL_cpufreq_set_target, .get = bL_cpufreq_get, .init = bL_cpufreq_init, .exit = bL_cpufreq_exit, - .attr = bL_cpufreq_attr, + .attr = cpufreq_generic_attr, }; int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops)