File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77#include <linux/clk-provider.h>
88#include <linux/dma-mapping.h>
99#include <linux/dmaengine.h>
10+ #include <linux/gpio-pxa.h>
1011#include <linux/platform_data/i2c-pxa.h>
1112#include <linux/soc/pxa/cpu.h>
1213
1718#include <linux/platform_data/usb-ohci-pxa27x.h>
1819#include <linux/platform_data/mmp_dma.h>
1920
21+ #include "mfp-pxa2xx.h"
2022#include "regs-ost.h"
2123#include "reset.h"
2224#include "devices.h"
@@ -650,18 +652,29 @@ struct resource pxa_resource_gpio[] = {
650652 },
651653};
652654
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+
653660struct platform_device pxa25x_device_gpio = {
654661 .name = "pxa25x-gpio" ,
655662 .id = -1 ,
656663 .num_resources = ARRAY_SIZE (pxa_resource_gpio ),
657664 .resource = pxa_resource_gpio ,
665+ .dev = {
666+ .platform_data = & pxa2xx_gpio_info ,
667+ },
658668};
659669
660670struct platform_device pxa27x_device_gpio = {
661671 .name = "pxa27x-gpio" ,
662672 .id = -1 ,
663673 .num_resources = ARRAY_SIZE (pxa_resource_gpio ),
664674 .resource = pxa_resource_gpio ,
675+ .dev = {
676+ .platform_data = & pxa2xx_gpio_info ,
677+ },
665678};
666679
667680static 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)
178178 pxa25x_get_clk_frequency_khz (1 );
179179}
180180
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-
186181static struct platform_device * pxa25x_devices [] __initdata = {
182+ & pxa25x_device_gpio ,
187183 & pxa25x_device_udc ,
188184 & pxa_device_pmu ,
189185 & pxa_device_i2s ,
@@ -244,7 +240,6 @@ static int __init pxa25x_init(void)
244240
245241 if (!of_have_populated_dt ()) {
246242 pxa2xx_set_dmac_info (& pxa25x_dma_pdata );
247- pxa_register_device (& pxa25x_device_gpio , & pxa25x_gpio_info );
248243 ret = platform_add_devices (pxa25x_devices ,
249244 ARRAY_SIZE (pxa25x_devices ));
250245 }
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)
276276 pxa_register_device (& pxa27x_device_i2c_power , info );
277277}
278278
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-
284279static struct platform_device * devices [] __initdata = {
280+ & pxa27x_device_gpio ,
285281 & pxa27x_device_udc ,
286282 & pxa_device_pmu ,
287283 & pxa_device_i2s ,
@@ -345,8 +341,6 @@ static int __init pxa27x_init(void)
345341 register_syscore_ops (& pxa2xx_mfp_syscore_ops );
346342
347343 if (!of_have_populated_dt ()) {
348- pxa_register_device (& pxa27x_device_gpio ,
349- & pxa27x_gpio_info );
350344 pxa2xx_set_dmac_info (& pxa27x_dma_pdata );
351345 ret = platform_add_devices (devices ,
352346 ARRAY_SIZE (devices ));
You can’t perform that action at this time.
0 commit comments