From patchwork Fri Apr 11 10:40:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 28267 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AF4D120822 for ; Fri, 11 Apr 2014 10:40:30 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id ur14sf2246709igb.9 for ; Fri, 11 Apr 2014 03:40:30 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=VfI4jGnFmjJAYmgELaLuNx3kLPQofp8DqZrDt3/eyeg=; b=icUJzXmJ6j0LmFAcdG5UydzRean8a9gmJq5IlRyqa0BAEKBF7R7qwOcDRYWshgFFID YSF4SSnzaU4ODwODndCdW0BFbDrWamL86dKfgWg3YQoendNzmYjCePZY19/v+kki14En QsL33NfAFQPdu4FZJEGw5EdJGD3Bwpyi+QPHp5vz0tKAWXA83eeHMgJXlGDjNCIcKQlb Gl3kQkUv309/rH45yMg0jt4DTCf9BGDLZtmupox6lhxjh15fKHzyoUOuvL0qjpvJ7e88 9JT0Q6NTOezmgDMNtJFBw40dsKF3+5JUJLKRd4U2xrTuBAOfIShAQmya9u/7lJ++l2Sf LdKg== X-Gm-Message-State: ALoCoQkMWoWQhD6SD/gvAYuOO1C6KovVu3bdHxBR7DPgxj72139Lb+vlSV9GOxud5bMY25XS4DrC X-Received: by 10.43.79.196 with SMTP id zr4mr10146879icb.3.1397212830077; Fri, 11 Apr 2014 03:40:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.70 with SMTP id u64ls1452713qgd.80.gmail; Fri, 11 Apr 2014 03:40:30 -0700 (PDT) X-Received: by 10.220.103.141 with SMTP id k13mr858123vco.25.1397212829988; Fri, 11 Apr 2014 03:40:29 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id wd2si1225844veb.113.2014.04.11.03.40.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 03:40:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 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.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so4529791veb.20 for ; Fri, 11 Apr 2014 03:40:29 -0700 (PDT) X-Received: by 10.221.55.133 with SMTP id vy5mr19303511vcb.17.1397212829900; Fri, 11 Apr 2014 03:40:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp46134vcb; Fri, 11 Apr 2014 03:40:29 -0700 (PDT) X-Received: by 10.66.149.7 with SMTP id tw7mr3715110pab.72.1397212828844; Fri, 11 Apr 2014 03:40:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xy8si3963775pab.160.2014.04.11.03.40.28; Fri, 11 Apr 2014 03:40:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756632AbaDKKk0 (ORCPT + 8 others); Fri, 11 Apr 2014 06:40:26 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:38774 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756741AbaDKKkW (ORCPT ); Fri, 11 Apr 2014 06:40:22 -0400 Received: by mail-we0-f172.google.com with SMTP id t61so5227875wes.17 for ; Fri, 11 Apr 2014 03:40:21 -0700 (PDT) X-Received: by 10.180.37.110 with SMTP id x14mr2872616wij.52.1397212821510; Fri, 11 Apr 2014 03:40:21 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-377-242.w86-199.abo.wanadoo.fr. [86.199.232.242]) by mx.google.com with ESMTPSA id eq8sm3683033wib.16.2014.04.11.03.40.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 03:40:20 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, t.figa@samsung.com, linaro-kernel@lists.linaro.org, rjw@rjwysocki.net Subject: [PATCH V5 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data Date: Fri, 11 Apr 2014 12:40:13 +0200 Message-Id: <1397212815-16068-19-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> References: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , No more dependency on the arch code. The platform_data field is used to set the PM callback as the other cpuidle drivers. Signed-off-by: Daniel Lezcano Reviewed-by: Viresh Kumar Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/cpuidle.c | 4 +++- arch/arm/mach-exynos/exynos.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 02609ac..1d1222e 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -27,7 +27,7 @@ #include -#include "common.h" +static void (*exynos_enter_aftr)(void); static int idle_finisher(unsigned long flags) { @@ -86,6 +86,8 @@ static int exynos_cpuidle_probe(struct platform_device *pdev) { int ret; + exynos_enter_aftr = (void *)(pdev->dev.platform_data); + ret = cpuidle_register(&exynos_idle_driver, NULL); if (ret) { dev_err(&pdev->dev, "failed to register cpuidle driver\n"); diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index fe8dac8..d22f0e4 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -221,8 +221,9 @@ void exynos_restart(enum reboot_mode mode, const char *cmd) } static struct platform_device exynos_cpuidle = { - .name = "exynos_cpuidle", - .id = -1, + .name = "exynos_cpuidle", + .dev.platform_data = exynos_enter_aftr, + .id = -1, }; void __init exynos_cpuidle_init(void)