1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
4 * Copyright 2011 Linaro Limited
5 */
6 #include "devices-common.h"
7 #include "../common.h"
8
mxc_register_gpio(char * name,int id,resource_size_t iobase,resource_size_t iosize,int irq,int irq_high)9 struct platform_device *__init mxc_register_gpio(char *name, int id,
10 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high)
11 {
12 struct resource res[] = {
13 {
14 .start = iobase,
15 .end = iobase + iosize - 1,
16 .flags = IORESOURCE_MEM,
17 }, {
18 .start = irq,
19 .end = irq,
20 .flags = IORESOURCE_IRQ,
21 }, {
22 .start = irq_high,
23 .end = irq_high,
24 .flags = IORESOURCE_IRQ,
25 },
26 };
27
28 return platform_device_register_resndata(&mxc_aips_bus,
29 name, id, res, ARRAY_SIZE(res), NULL, 0);
30 }
31