Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=54bb69e25016a7b11d83f03feafafdfe2b4d0859 Commit: 54bb69e25016a7b11d83f03feafafdfe2b4d0859 Parent: ad93ab0a6ee20130fb8f719fc1860c20daa99a7b Author: Haavard Skinnemoen <[EMAIL PROTECTED]> AuthorDate: Thu Jul 12 16:36:34 2007 +0200 Committer: Haavard Skinnemoen <[EMAIL PROTECTED]> CommitDate: Wed Aug 15 16:36:55 2007 +0200
[AVR32] Wire up i2c-gpio on the ATNGW100 board The NGW100 has a board controller which is hooked up to the TWI lines on AP7000. Since the TWI driver isn't in mainline, use the i2c-gpio driver in the mean time. Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]> --- arch/avr32/boards/atngw100/setup.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index 2edcecd..ef80156 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c @@ -9,6 +9,7 @@ */ #include <linux/clk.h> #include <linux/etherdevice.h> +#include <linux/i2c-gpio.h> #include <linux/init.h> #include <linux/linkage.h> #include <linux/platform_device.h> @@ -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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html