From 33d0351574daeba6add255c8e7ed6ab24306712f Mon Sep 17 00:00:00 2001 From: Hartley Sweeten Date: Thu, 16 Oct 2008 23:57:03 +0100 Subject: [PATCH] --- yaml --- r: 123628 b: refs/heads/master c: d52a26a956d3925c6eaf8770e95e4d5f13740696 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-ep93xx/core.c | 22 +++++++++++++++++++ .../arm/mach-ep93xx/include/mach/platform.h | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 86c9e29b0d64..680fabc739b2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4c5744ed59ac8c7312399f279b96e6e3d8f95b5d +refs/heads/master: d52a26a956d3925c6eaf8770e95e4d5f13740696 diff --git a/trunk/arch/arm/mach-ep93xx/core.c b/trunk/arch/arm/mach-ep93xx/core.c index 48345fb34613..61da67f31ce0 100644 --- a/trunk/arch/arm/mach-ep93xx/core.c +++ b/trunk/arch/arm/mach-ep93xx/core.c @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include @@ -497,6 +499,26 @@ void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) platform_device_register(&ep93xx_eth_device); } +static struct i2c_gpio_platform_data ep93xx_i2c_data = { + .sda_pin = EP93XX_GPIO_LINE_EEDAT, + .sda_is_open_drain = 0, + .scl_pin = EP93XX_GPIO_LINE_EECLK, + .scl_is_open_drain = 0, + .udelay = 2, +}; + +static struct platform_device ep93xx_i2c_device = { + .name = "i2c-gpio", + .id = 0, + .dev.platform_data = &ep93xx_i2c_data, +}; + +void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) +{ + i2c_register_board_info(0, devices, num); + platform_device_register(&ep93xx_i2c_device); +} + extern void ep93xx_gpio_init(void); void __init ep93xx_init_devices(void) diff --git a/trunk/arch/arm/mach-ep93xx/include/mach/platform.h b/trunk/arch/arm/mach-ep93xx/include/mach/platform.h index db2489d3bda7..88f7e88f152f 100644 --- a/trunk/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/trunk/arch/arm/mach-ep93xx/include/mach/platform.h @@ -14,6 +14,7 @@ void ep93xx_map_io(void); void ep93xx_init_irq(void); void ep93xx_init_time(unsigned long); void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); +void ep93xx_register_i2c(struct i2c_board_info *devices, int num); void ep93xx_init_devices(void); extern struct sys_timer ep93xx_timer;