From patchwork Tue Jan 8 10:50:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inderpal Singh X-Patchwork-Id: 13916 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8943323F7A for ; Tue, 8 Jan 2013 10:51:17 +0000 (UTC) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by fiordland.canonical.com (Postfix) with ESMTP id 2E7A5A181B4 for ; Tue, 8 Jan 2013 10:51:17 +0000 (UTC) Received: by mail-vb0-f47.google.com with SMTP id e21so215930vbm.20 for ; Tue, 08 Jan 2013 02:51:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=MxlDV/ujsHY1jBl5syhWevuDFujDKYBs2RDK5LiD1ps=; b=MyR89azn38g4NcnkkXCAfBDmb/3oXyef8/B0A2RvpUOyWewKJgDBh95NjQPXBNRwgq BSOs4tVuqTyFUmPgskTabs//xFCT9r1McoYyn0N0X5hIiTZwkfMPaUfrdistIb2FMyLF cjbiYEq/EVlU/i7gROd1c6d6Xo8W1EbXq15KQ9oTpvtqyyF3FexotNJ7CV9zXevjq8q2 fxVEJ9Ri9zg4+qsE8YMqJPyIg2y66bQaGFDpsUOR7mGw48+FXn/Ne7z9u1+RPCeO178a clyDbK4igXdw1dOmB5JdrcWAwelMVaSrO5KPKJlF1jN+q4W75nhj0l+MJs8BAVv9QkE0 iAQQ== X-Received: by 10.52.18.147 with SMTP id w19mr75334965vdd.94.1357642276695; Tue, 08 Jan 2013 02:51:16 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp103857veb; Tue, 8 Jan 2013 02:51:15 -0800 (PST) X-Received: by 10.68.231.10 with SMTP id tc10mr195161187pbc.81.1357642274081; Tue, 08 Jan 2013 02:51:14 -0800 (PST) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id j9si22310833pav.10.2013.01.08.02.51.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Jan 2013 02:51:14 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of inderpal.singh@linaro.org) client-ip=209.85.220.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of inderpal.singh@linaro.org) smtp.mail=inderpal.singh@linaro.org Received: by mail-pa0-f48.google.com with SMTP id fa1so266038pad.7 for ; Tue, 08 Jan 2013 02:51:12 -0800 (PST) X-Received: by 10.68.223.135 with SMTP id qu7mr119271812pbc.134.1357642272526; Tue, 08 Jan 2013 02:51:12 -0800 (PST) Received: from inder-ubuntu.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPS id ti9sm2728142pbc.16.2013.01.08.02.51.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Jan 2013 02:51:11 -0800 (PST) From: Inderpal Singh To: linux-pm@lists.linux-foundation.org Cc: rjw@sisk.pl, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, kgene.kim@samsung.com, patches@linaro.org Subject: [PATCH] cpufreq: exynos: Show list of available frequencies Date: Tue, 8 Jan 2013 16:20:58 +0530 Message-Id: <1357642258-32421-1-git-send-email-inderpal.singh@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlXttCbXSgxpPwVGwIxH7fh9EqGOP+DHHxbnd9pfzf4GZ2ECCz2z4S0J1jRI/XHUAgYbtDV Add freq_attr attribute to show list of available frequencies. Signed-off-by: Donggeun Kim Signed-off-by: MyungJoo Ham Signed-off-by: KyungMin Park Signed-off-by: Inderpal Singh --- drivers/cpufreq/exynos-cpufreq.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 7012ea8..bc1e833 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -244,13 +244,26 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) return cpufreq_frequency_table_cpuinfo(policy, exynos_info->freq_table); } +static int exynos_cpufreq_cpu_exit(struct cpufreq_policy *policy) +{ + cpufreq_frequency_table_put_attr(policy->cpu); + return 0; +} + +static struct freq_attr *exynos_cpufreq_attr[] = { + &cpufreq_freq_attr_scaling_available_freqs, + NULL, +}; + static struct cpufreq_driver exynos_driver = { .flags = CPUFREQ_STICKY, .verify = exynos_verify_speed, .target = exynos_target, .get = exynos_getspeed, .init = exynos_cpufreq_cpu_init, + .exit = exynos_cpufreq_cpu_exit, .name = "exynos_cpufreq", + .attr = exynos_cpufreq_attr, #ifdef CONFIG_PM .suspend = exynos_cpufreq_suspend, .resume = exynos_cpufreq_resume,