Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165Ab3FNJgT (ORCPT ); Fri, 14 Jun 2013 05:36:19 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:37276 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884Ab3FNJgS (ORCPT ); Fri, 14 Jun 2013 05:36:18 -0400 From: Philip Avinash To: , , , , CC: , , , Subject: [PATCH v2 4/7] ARM: davinci: creation of gpio platform device for dmxxx platforms Date: Fri, 14 Jun 2013 15:05:29 +0530 Message-ID: <1371202532-14628-5-git-send-email-avinashphilip@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371202532-14628-1-git-send-email-avinashphilip@ti.com> References: <1371202532-14628-1-git-send-email-avinashphilip@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2454 Lines: 67 gpio controller resource information being associated with davinci_soc_info structure and not created any device. Hence davinci gpio didn't fall under proper device model. This patch creates gpio davinci as a platform device for dmxxx platforms. Also add daivinci_register_gpio API to create platform device for dmxxx platforms. Signed-off-by: Philip Avinash Acked-by: Linus Walleij Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/devices.c | 13 +++++++++++++ arch/arm/mach-davinci/include/mach/common.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index a7068a3..b4f345b 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c @@ -313,6 +313,19 @@ static void davinci_init_wdt(void) platform_device_register(&davinci_wdt_device); } +static struct platform_device davinci_gpio_device = { + .name = "davinci_gpio", + .id = -1, +}; + +int davinci_gpio_register(struct resource *res, int size, void *pdata) +{ + davinci_gpio_device.resource = res; + davinci_gpio_device.num_resources = size; + davinci_gpio_device.dev.platform_data = pdata; + return platform_device_register(&davinci_gpio_device); +} + /*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/ diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index b124b77..bd389ba 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h @@ -14,6 +14,7 @@ #include #include +#include extern void davinci_timer_init(void); @@ -83,6 +84,7 @@ extern void davinci_common_init(struct davinci_soc_info *soc_info); extern void davinci_init_ide(void); void davinci_restart(char mode, const char *cmd); void davinci_init_late(void); +int davinci_gpio_register(struct resource *res, int size, void *pdata); #ifdef CONFIG_DAVINCI_RESET_CLOCKS int davinci_clk_disable_unused(void); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/