Adding support for MOXA ART SoC. Testing port of linux-2.6.32.60-moxart.
[linux-3.6.7-moxart.git] / arch / arm / mach-mxs / devices / platform-gpio-mxs.c
blobcd99f19ec637ac3a6d61065189aa1d294076eccd
1 /*
2 * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License version 2 as published by the
6 * Free Software Foundation.
7 */
8 #include <linux/compiler.h>
9 #include <linux/err.h>
10 #include <linux/init.h>
12 #include <mach/mx23.h>
13 #include <mach/mx28.h>
14 #include <mach/devices-common.h>
16 struct platform_device *__init mxs_add_gpio(
17 char *name, int id, resource_size_t iobase, int irq)
19 struct resource res[] = {
21 .start = iobase,
22 .end = iobase + SZ_8K - 1,
23 .flags = IORESOURCE_MEM,
24 }, {
25 .start = irq,
26 .end = irq,
27 .flags = IORESOURCE_IRQ,
31 return platform_device_register_resndata(&mxs_apbh_bus,
32 name, id, res, ARRAY_SIZE(res), NULL, 0);