From patchwork Thu Apr 19 20:36:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7967 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 72F5723E20 for ; Thu, 19 Apr 2012 20:37:27 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3B37EA180E6 for ; Thu, 19 Apr 2012 20:37:27 +0000 (UTC) Received: by yenl4 with SMTP id l4so6001107yen.11 for ; Thu, 19 Apr 2012 13:37:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=1ocJFDg08GidchhW1xHt3NpIXJMEj2fDxucGXcHGOYE=; b=MjwS2232n7tzyfnn61FjwxLmaEvcbwEqRdeS9a0hA1209VXlM5sHyCg0xXnajUcGna cQo7JcJYxn4GN3IY45YFtql93E3iP11qRRd1S3TJHwvipjCH/ZC8xBSdAoH5DIdVWdMn OdAyOxYuNFzYN9OhdYqP7ye8l3P09RTDjLkkP3KqltdfeNGmdfORqCbvH5bsE8WG1O3A BHsWYJKOJWQqhVNY14m0ez6TbhvuiM7/BCuBQg/Q3VXOBX/+5u6b254XljqwlH+as+7T SAYZeLePhf4V4r6GuMJT+Zjg5Fu+TBBEoYMeMKo5DfNN9QeuT9tkue5/ZNIwAvxpBOnQ sJfw== Received: by 10.50.154.167 with SMTP id vp7mr3838230igb.55.1334867846405; Thu, 19 Apr 2012 13:37: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.231.137.198 with SMTP id x6csp317263ibt; Thu, 19 Apr 2012 13:37:25 -0700 (PDT) Received: by 10.180.77.4 with SMTP id o4mr8608015wiw.17.1334867844866; Thu, 19 Apr 2012 13:37:24 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id fr6si117782wib.15.2012.04.19.13.37.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 13:37:24 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds12so8717086wgb.31 for ; Thu, 19 Apr 2012 13:37:24 -0700 (PDT) Received: by 10.180.102.101 with SMTP id fn5mr8598937wib.6.1334867844356; Thu, 19 Apr 2012 13:37:24 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id h8sm345540wix.4.2012.04.19.13.37.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 13:37:23 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, linux@arm.linux.org.uk Cc: Lee Jones , Samuel Ortiz Subject: [PATCH 14/15] mfd/db8500-prcmu: Add Device Tree support and enable ux500 platforms Date: Thu, 19 Apr 2012 21:36:43 +0100 Message-Id: <1334867804-31942-15-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1334867804-31942-1-git-send-email-lee.jones@linaro.org> References: <1334867804-31942-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkOcEEnw1bnyZhvML2GZ/uU2Nh+/3+B8jFWL4LOFQm2CmRIyncvtwGK0DyAXC8LNTKB+jms Here we see the db8500-prcmu driver obtain DT support. In its current state, all we have to do is offer a matching compatible node and the driver will register and initialise correctly. We Also remove any initialisation completed in platform code to prevent any device duplication. CC: Samuel Ortiz Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 3 +-- drivers/mfd/db8500-prcmu.c | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index c97eab7..2512b6a 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -124,7 +124,6 @@ static struct platform_device *platform_devs[] __initdata = { static struct platform_device *of_platform_devs[] __initdata = { &u8500_dma40_device, &db8500_pmu_device, - &db8500_prcmu_device, }; static resource_size_t __initdata db8500_gpio_base[] = { @@ -234,7 +233,7 @@ struct device * __init u8500_of_init_devices(void) * Devices to be DT:ed: * u8500_dma40_device = todo * db8500_pmu_device = todo - * db8500_prcmu_device = todo + * db8500_prcmu_device = done */ platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs)); diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 839e70b..3c2e4a9 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2992,11 +2992,16 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev) no_irq_return: return err; } +static const struct of_device_id db8500_prcmu_match[] = { + { .compatible = "stericsson,db8500-prcmu"}, + { }, +}; static struct platform_driver db8500_prcmu_driver = { .driver = { .name = "db8500-prcmu", .owner = THIS_MODULE, + .of_match_table = db8500_prcmu_match, }, .probe = db8500_prcmu_probe, };