From b55158c8d6a527e72c5e51ec36f0a1450016603b Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Thu, 12 Jul 2007 16:36:34 +0200 Subject: [PATCH] --- yaml --- r: 64056 b: refs/heads/master c: 54bb69e25016a7b11d83f03feafafdfe2b4d0859 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/avr32/boards/atngw100/setup.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b282917c2523..9c850d2f6d5b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ad93ab0a6ee20130fb8f719fc1860c20daa99a7b +refs/heads/master: 54bb69e25016a7b11d83f03feafafdfe2b4d0859 diff --git a/trunk/arch/avr32/boards/atngw100/setup.c b/trunk/arch/avr32/boards/atngw100/setup.c index 2edcecdea8bd..ef801563bbf5 100644 --- a/trunk/arch/avr32/boards/atngw100/setup.c +++ b/trunk/arch/avr32/boards/atngw100/setup.c @@ -9,6 +9,7 @@ */ #include #include +#include #include #include #include @@ -123,6 +124,19 @@ static struct platform_device ngw_gpio_leds = { } }; +static struct i2c_gpio_platform_data i2c_gpio_data = { + .sda_pin = GPIO_PIN_PA(6), + .scl_pin = GPIO_PIN_PA(7), +}; + +static struct platform_device i2c_gpio_device = { + .name = "i2c-gpio", + .id = 0, + .dev = { + .platform_data = &i2c_gpio_data, + }, +}; + static int __init atngw100_init(void) { unsigned i; @@ -147,6 +161,10 @@ static int __init atngw100_init(void) } platform_device_register(&ngw_gpio_leds); + at32_select_gpio(i2c_gpio_data.sda_pin, 0); + at32_select_gpio(i2c_gpio_data.scl_pin, 0); + platform_device_register(&i2c_gpio_device); + return 0; } postcore_initcall(atngw100_init);