From patchwork Sat Feb 9 20:44:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 2121071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3B8ABDF264 for ; Sat, 9 Feb 2013 20:48:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U4HIr-0001xN-9S; Sat, 09 Feb 2013 20:45:41 +0000 Received: from bhuna.collabora.co.uk ([93.93.135.160]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U4HIB-0001qw-UE for linux-arm-kernel@lists.infradead.org; Sat, 09 Feb 2013 20:45:01 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id 08EB416984C6 From: Javier Martinez Canillas To: Tony Lindgren Subject: [PATCH RFC 4/7] ARM: OMAP: gpmc-smsc911x: pass a dev node to platform registration Date: Sat, 9 Feb 2013 21:44:28 +0100 Message-Id: <1360442671-15216-5-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1360442671-15216-1-git-send-email-javier.martinez@collabora.co.uk> References: <1360442671-15216-1-git-send-email-javier.martinez@collabora.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130209_154500_105030_D5028482 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines Cc: Russell King , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Enric Balletbo i Serra , Greg Kroah-Hartman , Linus Walleij , Javier Martinez Canillas , Ezequiel Garcia , linux-omap@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The smsc911x driver needs the GPMC smsc911x associated device node to set the OMAP mux pins using the pinctrl framework. Signed-off-by: Javier Martinez Canillas --- arch/arm/mach-omap2/gpmc-smsc911x.c | 5 ++++- arch/arm/mach-omap2/gpmc-smsc911x.h | 1 + 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 59a2ee4..9f3b0a5 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c @@ -83,7 +83,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg) pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id, gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources), - &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config), NULL); + &gpmc_smsc911x_config, sizeof(gpmc_smsc911x_config), + gpmc_cfg->of_node); if (!pdev) { pr_err("Unable to register platform device\n"); gpio_free(gpmc_cfg->gpio_reset); @@ -107,6 +108,8 @@ int gpmc_smsc911x_init_dt(struct device_node *node) if (WARN_ON(!node)) return -ENODEV; + gpmc_cfg.of_node = node; + if (of_property_read_u32(node, "gpmc,cs", &gpmc_cfg.cs)) { pr_err("Unable to get GPMC smsc911x chip select\n"); return -EINVAL; diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.h b/arch/arm/mach-omap2/gpmc-smsc911x.h index bbcb8bc..32a7df0 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.h +++ b/arch/arm/mach-omap2/gpmc-smsc911x.h @@ -19,6 +19,7 @@ struct omap_smsc911x_platform_data { int gpio_irq; int gpio_reset; u32 flags; + struct device_node *of_node; }; #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)