aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/boards/atngw100
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/boards/atngw100')
-rw-r--r--arch/avr32/boards/atngw100/setup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index 2edcecdea8bd..ef801563bbf5 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -9,6 +9,7 @@
9 */ 9 */
10#include <linux/clk.h> 10#include <linux/clk.h>
11#include <linux/etherdevice.h> 11#include <linux/etherdevice.h>
12#include <linux/i2c-gpio.h>
12#include <linux/init.h> 13#include <linux/init.h>
13#include <linux/linkage.h> 14#include <linux/linkage.h>
14#include <linux/platform_device.h> 15#include <linux/platform_device.h>
@@ -123,6 +124,19 @@ static struct platform_device ngw_gpio_leds = {
123 } 124 }
124}; 125};
125 126
127static struct i2c_gpio_platform_data i2c_gpio_data = {
128 .sda_pin = GPIO_PIN_PA(6),
129 .scl_pin = GPIO_PIN_PA(7),
130};
131
132static struct platform_device i2c_gpio_device = {
133 .name = "i2c-gpio",
134 .id = 0,
135 .dev = {
136 .platform_data = &i2c_gpio_data,
137 },
138};
139
126static int __init atngw100_init(void) 140static int __init atngw100_init(void)
127{ 141{
128 unsigned i; 142 unsigned i;
@@ -147,6 +161,10 @@ static int __init atngw100_init(void)
147 } 161 }
148 platform_device_register(&ngw_gpio_leds); 162 platform_device_register(&ngw_gpio_leds);
149 163
164 at32_select_gpio(i2c_gpio_data.sda_pin, 0);
165 at32_select_gpio(i2c_gpio_data.scl_pin, 0);
166 platform_device_register(&i2c_gpio_device);
167
150 return 0; 168 return 0;
151} 169}
152postcore_initcall(atngw100_init); 170postcore_initcall(atngw100_init);