File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 7
7
#include <linux/clk-provider.h>
8
8
#include <linux/dma-mapping.h>
9
9
#include <linux/dmaengine.h>
10
+ #include <linux/gpio-pxa.h>
10
11
#include <linux/platform_data/i2c-pxa.h>
11
12
#include <linux/soc/pxa/cpu.h>
12
13
17
18
#include <linux/platform_data/usb-ohci-pxa27x.h>
18
19
#include <linux/platform_data/mmp_dma.h>
19
20
21
+ #include "mfp-pxa2xx.h"
20
22
#include "regs-ost.h"
21
23
#include "reset.h"
22
24
#include "devices.h"
@@ -650,18 +652,29 @@ struct resource pxa_resource_gpio[] = {
650
652
},
651
653
};
652
654
655
+ static struct pxa_gpio_platform_data pxa2xx_gpio_info = {
656
+ .irq_base = PXA_GPIO_TO_IRQ (0 ),
657
+ .gpio_set_wake = gpio_set_wake ,
658
+ };
659
+
653
660
struct platform_device pxa25x_device_gpio = {
654
661
.name = "pxa25x-gpio" ,
655
662
.id = -1 ,
656
663
.num_resources = ARRAY_SIZE (pxa_resource_gpio ),
657
664
.resource = pxa_resource_gpio ,
665
+ .dev = {
666
+ .platform_data = & pxa2xx_gpio_info ,
667
+ },
658
668
};
659
669
660
670
struct platform_device pxa27x_device_gpio = {
661
671
.name = "pxa27x-gpio" ,
662
672
.id = -1 ,
663
673
.num_resources = ARRAY_SIZE (pxa_resource_gpio ),
664
674
.resource = pxa_resource_gpio ,
675
+ .dev = {
676
+ .platform_data = & pxa2xx_gpio_info ,
677
+ },
665
678
};
666
679
667
680
static struct resource pxa_dma_resource [] = {
Original file line number Diff line number Diff line change @@ -178,12 +178,8 @@ void __init pxa25x_map_io(void)
178
178
pxa25x_get_clk_frequency_khz (1 );
179
179
}
180
180
181
- static struct pxa_gpio_platform_data pxa25x_gpio_info __initdata = {
182
- .irq_base = PXA_GPIO_TO_IRQ (0 ),
183
- .gpio_set_wake = gpio_set_wake ,
184
- };
185
-
186
181
static struct platform_device * pxa25x_devices [] __initdata = {
182
+ & pxa25x_device_gpio ,
187
183
& pxa25x_device_udc ,
188
184
& pxa_device_pmu ,
189
185
& pxa_device_i2s ,
@@ -244,7 +240,6 @@ static int __init pxa25x_init(void)
244
240
245
241
if (!of_have_populated_dt ()) {
246
242
pxa2xx_set_dmac_info (& pxa25x_dma_pdata );
247
- pxa_register_device (& pxa25x_device_gpio , & pxa25x_gpio_info );
248
243
ret = platform_add_devices (pxa25x_devices ,
249
244
ARRAY_SIZE (pxa25x_devices ));
250
245
}
Original file line number Diff line number Diff line change @@ -276,12 +276,8 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
276
276
pxa_register_device (& pxa27x_device_i2c_power , info );
277
277
}
278
278
279
- static struct pxa_gpio_platform_data pxa27x_gpio_info __initdata = {
280
- .irq_base = PXA_GPIO_TO_IRQ (0 ),
281
- .gpio_set_wake = gpio_set_wake ,
282
- };
283
-
284
279
static struct platform_device * devices [] __initdata = {
280
+ & pxa27x_device_gpio ,
285
281
& pxa27x_device_udc ,
286
282
& pxa_device_pmu ,
287
283
& pxa_device_i2s ,
@@ -345,8 +341,6 @@ static int __init pxa27x_init(void)
345
341
register_syscore_ops (& pxa2xx_mfp_syscore_ops );
346
342
347
343
if (!of_have_populated_dt ()) {
348
- pxa_register_device (& pxa27x_device_gpio ,
349
- & pxa27x_gpio_info );
350
344
pxa2xx_set_dmac_info (& pxa27x_dma_pdata );
351
345
ret = platform_add_devices (devices ,
352
346
ARRAY_SIZE (devices ));
You can’t perform that action at this time.
0 commit comments