1 --- a/arch/arm/mach-ixp4xx/cambria-setup.c
2 +++ b/arch/arm/mach-ixp4xx/cambria-setup.c
6 #include <linux/device.h>
7 +#include <linux/gpio_buttons.h>
9 #include <linux/i2c-gpio.h>
10 #include <linux/i2c/at24.h>
11 +#include <linux/i2c/gw_i2c_pld.h>
12 #include <linux/if_ether.h>
13 #include <linux/init.h>
14 +#include <linux/input.h>
15 #include <linux/kernel.h>
16 #include <linux/leds.h>
17 #include <linux/memory.h>
18 @@ -323,6 +326,39 @@ static struct platform_device cambria_us
22 +static struct gw_i2c_pld_platform_data gw_i2c_pld_data0 = {
27 +static struct gw_i2c_pld_platform_data gw_i2c_pld_data1 = {
33 +static struct gpio_button cambria_gpio_buttons[] = {
43 +static struct gpio_buttons_platform_data cambria_gpio_buttons_data = {
44 + .poll_interval = 500,
46 + .buttons = cambria_gpio_buttons,
49 +static struct platform_device cambria_gpio_buttons_device = {
50 + .name = "gpio-buttons",
52 + .dev.platform_data = &cambria_gpio_buttons_data,
55 static struct platform_device *cambria_devices[] __initdata = {
58 @@ -331,6 +367,11 @@ static struct platform_device *cambria_d
60 static void __init cambria_gw23xx_setup(void)
62 + cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\
63 + (1 << 5) | (1 << 8) | (1 << 9) | (1 << 12);
64 + cambria_gpio_resources[0].end = cambria_gpio_resources[0].start;
66 + platform_device_register(&cambria_gpio);
67 platform_device_register(&cambria_npec_device);
68 platform_device_register(&cambria_npea_device);
70 @@ -377,7 +418,8 @@ static void __init cambria_gw2358_setup(
71 cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
72 cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
74 - cambria_gpio_resources[0].start = (1 << 14);
75 + cambria_gpio_resources[0].start = (1 << 14) | (1 << 16) | (1 << 17) | (1 << 18) |\
76 + (1 << 19) | (1 << 20) | (1 << 24) | (1 << 25);
77 cambria_gpio_resources[0].end = cambria_gpio_resources[0].start;
79 platform_device_register(&cambria_gpio);
80 @@ -391,7 +433,12 @@ static void __init cambria_gw2358_setup(
82 platform_device_register(&cambria_pata);
84 + cambria_gpio_leds[0].gpio = 24;
85 + platform_device_register(&cambria_gpio_leds_device);
87 platform_device_register(&cambria_latch_leds_device);
89 + platform_device_register(&cambria_gpio_buttons_device);
92 static struct cambria_board_info cambria_boards[] __initdata = {
93 @@ -460,6 +507,14 @@ static struct i2c_board_info __initdata
94 I2C_BOARD_INFO("24c08", 0x51),
95 .platform_data = &cambria_eeprom_info
98 + I2C_BOARD_INFO("gw_i2c_pld", 0x56),
99 + .platform_data = &gw_i2c_pld_data0,
102 + I2C_BOARD_INFO("gw_i2c_pld", 0x57),
103 + .platform_data = &gw_i2c_pld_data1,
107 static void __init cambria_init(void)