aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index fe2446ded5ad..e6b8967f5e68 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -20,6 +20,7 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/i2c/pca953x.h>
23 24
24#include <mach/hardware.h> 25#include <mach/hardware.h>
25#include <mach/am35xx.h> 26#include <mach/am35xx.h>
@@ -71,11 +72,46 @@ static void __init am3517_evm_rtc_init(void)
71 am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ); 72 am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
72} 73}
73 74
75/*
76 * I2C GPIO Expander - TCA6416
77 */
78
79/* Mounted on Base-Board */
80static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
81 .gpio_base = OMAP_MAX_GPIO_LINES,
82};
83static struct i2c_board_info __initdata am3517evm_tca6516_info_0[] = {
84 {
85 I2C_BOARD_INFO("tca6416", 0x21),
86 .platform_data = &am3517evm_gpio_expander_info_0,
87 },
88};
89
90/* Mounted on UI Card */
91static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = {
92 .gpio_base = OMAP_MAX_GPIO_LINES + 16,
93};
94static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
95 .gpio_base = OMAP_MAX_GPIO_LINES + 32,
96};
97static struct i2c_board_info __initdata am3517evm_ui_tca6516_info[] = {
98 {
99 I2C_BOARD_INFO("tca6416", 0x20),
100 .platform_data = &am3517evm_ui_gpio_expander_info_1,
101 },
102 {
103 I2C_BOARD_INFO("tca6416", 0x21),
104 .platform_data = &am3517evm_ui_gpio_expander_info_2,
105 },
106};
107
74static int __init am3517_evm_i2c_init(void) 108static int __init am3517_evm_i2c_init(void)
75{ 109{
76 omap_register_i2c_bus(1, 400, NULL, 0); 110 omap_register_i2c_bus(1, 400, NULL, 0);
77 omap_register_i2c_bus(2, 400, NULL, 0); 111 omap_register_i2c_bus(2, 400, am3517evm_tca6516_info_0,
78 omap_register_i2c_bus(3, 400, NULL, 0); 112 ARRAY_SIZE(am3517evm_tca6516_info_0));
113 omap_register_i2c_bus(3, 400, am3517evm_ui_tca6516_info,
114 ARRAY_SIZE(am3517evm_ui_tca6516_info));
79 115
80 return 0; 116 return 0;
81} 117}