linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: prabhakar.csengg@gmail.com (Lad, Prabhakar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/7] ARM: davinci: devices.c: support gpio platform device
Date: Sun, 18 Aug 2013 10:49:00 +0530	[thread overview]
Message-ID: <1376803143-13738-5-git-send-email-prabhakar.csengg@gmail.com> (raw)
In-Reply-To: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com>

From: Philip Avinash <avinashphilip@ti.com>

DaVinci GPIO driver now uses platform device model.
Add a GPIO platform register API to convert the
traditional DaVinci  SoCs to use the new model.

Signed-off-by: Philip Avinash <avinashphilip@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
[nsekhar at ti.com: move function declaration to local header,
simplify commit message]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 arch/arm/mach-davinci/davinci.h |    2 ++
 arch/arm/mach-davinci/devices.c |   13 +++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h
index 2ab5d57..6dfc038 100644
--- a/arch/arm/mach-davinci/davinci.h
+++ b/arch/arm/mach-davinci/davinci.h
@@ -53,6 +53,8 @@ extern void __iomem *davinci_sysmod_base;
 #define DAVINCI_SYSMOD_VIRT(x)	(davinci_sysmod_base + (x))
 void davinci_map_sysmod(void);
 
+int davinci_gpio_register(struct resource *res, int size, void *pdata);
+
 /* DM355 base addresses */
 #define DM355_ASYNC_EMIF_CONTROL_BASE	0x01e10000
 #define DM355_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index 111573c..b0fac4e 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -318,6 +318,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);
+}
+
 /*-------------------------------------------------------------------------*/
 
 /*-------------------------------------------------------------------------*/
-- 
1.7.9.5

  parent reply	other threads:[~2013-08-18  5:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-18  5:18 [PATCH v3 0/7] Convert GPIO Davinci to platform driver Lad, Prabhakar
2013-08-18  5:18 ` [PATCH v3 1/7] gpio: davinci: coding style correction Lad, Prabhakar
2013-08-23 17:53   ` Sekhar Nori
2013-08-18  5:18 ` [PATCH v3 2/7] gpio: davinci: move to platform device Lad, Prabhakar
2013-08-23 18:02   ` Sekhar Nori
2013-08-18  5:18 ` [PATCH v3 3/7] ARM: davinci: da8xx: support gpio " Lad, Prabhakar
2013-08-26 10:55   ` Sekhar Nori
2013-08-18  5:19 ` Lad, Prabhakar [this message]
2013-08-27 19:37   ` [PATCH v3 4/7] ARM: davinci: devices.c: " Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 5/7] ARM: davinci: da8xx: gpio device creation Lad, Prabhakar
2013-08-27 20:05   ` Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 6/7] ARM: davinci: dmxxx: " Lad, Prabhakar
2013-08-27 20:25   ` Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 7/7] ARM: davinci: Start using gpiolib API inplace of inline functions Lad, Prabhakar
2013-08-27 20:33   ` Sekhar Nori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376803143-13738-5-git-send-email-prabhakar.csengg@gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).