From patchwork Thu Jul 7 13:32:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 952852 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p67DRqbb011564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 7 Jul 2011 13:28:12 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p67DQRUt021301; Thu, 7 Jul 2011 06:26:27 -0700 Received: from mail-pv0-f175.google.com (mail-pv0-f175.google.com [74.125.83.175]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p67DOH9q021007 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 7 Jul 2011 06:24:18 -0700 Received: by pvf24 with SMTP id 24so416236pvf.6 for ; Thu, 07 Jul 2011 06:24:17 -0700 (PDT) Received: by 10.68.30.2 with SMTP id o2mr1233176pbh.414.1310045057023; Thu, 07 Jul 2011 06:24:17 -0700 (PDT) Received: from [127.0.0.1] (FLH1Ama088.tky.mesh.ad.jp [202.225.112.88]) by mx.google.com with ESMTPS id m7sm5587540pbk.6.2011.07.07.06.24.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jul 2011 06:24:16 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Thu, 07 Jul 2011 22:32:29 +0900 Message-Id: <20110707133229.22347.51430.sendpatchset@t400s> In-Reply-To: <20110707133212.22347.68775.sendpatchset@t400s> References: <20110707133212.22347.68775.sendpatchset@t400s> Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-3.812 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SPF_PASS, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: linux-pm@lists.linux-foundation.org Subject: [linux-pm] [PATCH 02/05] ARM: mach-shmobile: Runtime PM late init callback X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 07 Jul 2011 13:28:12 +0000 (UTC) From: Magnus Damm Add a mach-shmobile specific callback for SoC-specific code to hook into. By having the late_initcall() in a common place we can have multi-SoC/board support in the same kernel binary. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/include/mach/common.h | 1 + arch/arm/mach-shmobile/pm_runtime.c | 10 ++++++++++ 2 files changed, 11 insertions(+) --- 0001/arch/arm/mach-shmobile/include/mach/common.h +++ work/arch/arm/mach-shmobile/include/mach/common.h 2011-07-07 19:39:49.000000000 +0900 @@ -12,6 +12,7 @@ extern struct platform_suspend_ops shmob struct cpuidle_device; extern void (*shmobile_cpuidle_modes[])(void); extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev); +extern void (*shmobile_runtime_pm_late_init)(void); extern void sh7367_init_irq(void); extern void sh7367_add_early_devices(void); --- 0001/arch/arm/mach-shmobile/pm_runtime.c +++ work/arch/arm/mach-shmobile/pm_runtime.c 2011-07-07 19:39:28.000000000 +0900 @@ -56,3 +56,13 @@ static int __init sh_pm_runtime_init(voi return 0; } core_initcall(sh_pm_runtime_init); + +void (*shmobile_runtime_pm_late_init)(void); + +static int __init sh_pm_runtime_late_init(void) +{ + if (shmobile_runtime_pm_late_init) + shmobile_runtime_pm_late_init(); + return 0; +} +late_initcall(sh_pm_runtime_late_init);