diff options
Diffstat (limited to 'arch/arm/mach-ep93xx/edb93xx.c')
-rw-r--r-- | arch/arm/mach-ep93xx/edb93xx.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 73145ae5d3fa..a4a7be308000 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -27,8 +27,10 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/i2c.h> | ||
31 | #include <linux/mtd/physmap.h> | 30 | #include <linux/mtd/physmap.h> |
31 | #include <linux/gpio.h> | ||
32 | #include <linux/i2c.h> | ||
33 | #include <linux/i2c-gpio.h> | ||
32 | 34 | ||
33 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
34 | 36 | ||
@@ -76,13 +78,26 @@ static struct ep93xx_eth_data edb93xx_eth_data = { | |||
76 | .phy_id = 1, | 78 | .phy_id = 1, |
77 | }; | 79 | }; |
78 | 80 | ||
79 | static struct i2c_board_info __initdata edb93xxa_i2c_data[] = { | 81 | |
82 | /************************************************************************* | ||
83 | * EDB93xx i2c peripheral handling | ||
84 | *************************************************************************/ | ||
85 | static struct i2c_gpio_platform_data edb93xx_i2c_gpio_data = { | ||
86 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | ||
87 | .sda_is_open_drain = 0, | ||
88 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | ||
89 | .scl_is_open_drain = 0, | ||
90 | .udelay = 0, /* default to 100 kHz */ | ||
91 | .timeout = 0, /* default to 100 ms */ | ||
92 | }; | ||
93 | |||
94 | static struct i2c_board_info __initdata edb93xxa_i2c_board_info[] = { | ||
80 | { | 95 | { |
81 | I2C_BOARD_INFO("isl1208", 0x6f), | 96 | I2C_BOARD_INFO("isl1208", 0x6f), |
82 | }, | 97 | }, |
83 | }; | 98 | }; |
84 | 99 | ||
85 | static struct i2c_board_info __initdata edb93xx_i2c_data[] = { | 100 | static struct i2c_board_info __initdata edb93xx_i2c_board_info[] = { |
86 | { | 101 | { |
87 | I2C_BOARD_INFO("ds1337", 0x68), | 102 | I2C_BOARD_INFO("ds1337", 0x68), |
88 | }, | 103 | }, |
@@ -92,12 +107,14 @@ static void __init edb93xx_register_i2c(void) | |||
92 | { | 107 | { |
93 | if (machine_is_edb9302a() || machine_is_edb9307a() || | 108 | if (machine_is_edb9302a() || machine_is_edb9307a() || |
94 | machine_is_edb9315a()) { | 109 | machine_is_edb9315a()) { |
95 | ep93xx_register_i2c(edb93xxa_i2c_data, | 110 | ep93xx_register_i2c(&edb93xx_i2c_gpio_data, |
96 | ARRAY_SIZE(edb93xxa_i2c_data)); | 111 | edb93xxa_i2c_board_info, |
112 | ARRAY_SIZE(edb93xxa_i2c_board_info)); | ||
97 | } else if (machine_is_edb9307() || machine_is_edb9312() || | 113 | } else if (machine_is_edb9307() || machine_is_edb9312() || |
98 | machine_is_edb9315()) { | 114 | machine_is_edb9315()) { |
99 | ep93xx_register_i2c(edb93xx_i2c_data, | 115 | ep93xx_register_i2c(&edb93xx_i2c_gpio_data, |
100 | ARRAY_SIZE(edb93xx_i2c_data)); | 116 | edb93xx_i2c_board_info, |
117 | ARRAY_SIZE(edb93xx_i2c_board_info)); | ||
101 | } | 118 | } |
102 | } | 119 | } |
103 | 120 | ||