From patchwork Fri Aug 12 08:29:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 3416 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 4E7D723F4D for ; Fri, 12 Aug 2011 08:30:27 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id 15E2DA18756 for ; Fri, 12 Aug 2011 08:30:26 +0000 (UTC) Received: by qwb8 with SMTP id 8so2155301qwb.11 for ; Fri, 12 Aug 2011 01:30:26 -0700 (PDT) Received: by 10.229.78.223 with SMTP id m31mr435498qck.98.1313137826525; Fri, 12 Aug 2011 01:30:26 -0700 (PDT) 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.229.190.71 with SMTP id dh7cs141512qcb; Fri, 12 Aug 2011 01:30:26 -0700 (PDT) Received: from mr.google.com ([10.213.33.70]) by 10.213.33.70 with SMTP id g6mr290782ebd.84.1313137826119 (num_hops = 1); Fri, 12 Aug 2011 01:30:26 -0700 (PDT) Received: by 10.213.33.70 with SMTP id g6mr198623ebd.84.1313137825502; Fri, 12 Aug 2011 01:30:25 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com [207.126.144.129]) by mx.google.com with SMTP id 45si1993120eez.193.2011.08.12.01.29.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 01:30:25 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKTkTkeCjUkXlU+PHeMSyuzh8ug3fjXYgq@postini.com; Fri, 12 Aug 2011 08:29:49 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 3F8976F; Fri, 12 Aug 2011 08:29:41 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id EFD03170; Fri, 12 Aug 2011 08:29:40 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 87BA3A807D; Fri, 12 Aug 2011 10:29:36 +0200 (CEST) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 12 Aug 2011 10:29:40 +0200 From: Linus Walleij To: Samuel Ortiz , Cc: Lee Jones , Linus Walleij Subject: [PATCH 15/23] mfd/db5500-prcmu: convert to platform device Date: Fri, 12 Aug 2011 10:29:37 +0200 Message-ID: <1313137777-31081-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 From: Linus Walleij This converts the DB5500 PRCMU driver to become a platform device just like the DB8500 PRCMU driver. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/cpu-db5500.c | 5 +++++ drivers/mfd/db5500-prcmu.c | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 22705d2..e532c32 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c @@ -151,11 +151,16 @@ static struct platform_device mbox2_device = { .num_resources = ARRAY_SIZE(mbox2_resources), }; +static struct platform_device db5500_prcmu_device = { + .name = "db5500-prcmu", +}; + static struct platform_device *db5500_platform_devs[] __initdata = { &db5500_pmu_device, &mbox0_device, &mbox1_device, &mbox2_device, + &db5500_prcmu_device, }; static resource_size_t __initdata db5500_gpio_base[] = { diff --git a/drivers/mfd/db5500-prcmu.c b/drivers/mfd/db5500-prcmu.c index 2762cfa..5550ac9 100644 --- a/drivers/mfd/db5500-prcmu.c +++ b/drivers/mfd/db5500-prcmu.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -894,7 +895,7 @@ void __init db5500_prcmu_early_init(void) * prcmu_fw_init - arch init call for the Linux PRCMU fw init logic * */ -int __init db5500_prcmu_init(void) +static int __init db5500_prcmu_probe(struct platform_device *pdev) { int err = 0; @@ -917,4 +918,16 @@ no_irq_return: } +static struct platform_driver db5500_prcmu_driver = { + .driver = { + .name = "db5500-prcmu", + .owner = THIS_MODULE, + }, +}; + +static int __init db5500_prcmu_init(void) +{ + return platform_driver_probe(&db5500_prcmu_driver, db5500_prcmu_probe); +} + arch_initcall(db5500_prcmu_init);