Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184748
b: refs/heads/master
c: 5d4292a
h: refs/heads/master
v: v3
  • Loading branch information
Vaibhav Hiremath authored and Tony Lindgren committed Feb 19, 2010
1 parent c37da2b commit bc0d5e7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2afbbb82e263086d02a772e43f5290b1a6f673e
refs/heads/master: 5d4292a524d8908060b077f4d80c106cb288f2e7
40 changes: 38 additions & 2 deletions trunk/arch/arm/mach-omap2/board-am3517evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/i2c/pca953x.h>

#include <mach/hardware.h>
#include <mach/am35xx.h>
Expand Down Expand Up @@ -71,11 +72,46 @@ static void __init am3517_evm_rtc_init(void)
am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
}

/*
* I2C GPIO Expander - TCA6416
*/

/* Mounted on Base-Board */
static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
.gpio_base = OMAP_MAX_GPIO_LINES,
};
static struct i2c_board_info __initdata am3517evm_tca6516_info_0[] = {
{
I2C_BOARD_INFO("tca6416", 0x21),
.platform_data = &am3517evm_gpio_expander_info_0,
},
};

/* Mounted on UI Card */
static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = {
.gpio_base = OMAP_MAX_GPIO_LINES + 16,
};
static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
.gpio_base = OMAP_MAX_GPIO_LINES + 32,
};
static struct i2c_board_info __initdata am3517evm_ui_tca6516_info[] = {
{
I2C_BOARD_INFO("tca6416", 0x20),
.platform_data = &am3517evm_ui_gpio_expander_info_1,
},
{
I2C_BOARD_INFO("tca6416", 0x21),
.platform_data = &am3517evm_ui_gpio_expander_info_2,
},
};

static int __init am3517_evm_i2c_init(void)
{
omap_register_i2c_bus(1, 400, NULL, 0);
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0);
omap_register_i2c_bus(2, 400, am3517evm_tca6516_info_0,
ARRAY_SIZE(am3517evm_tca6516_info_0));
omap_register_i2c_bus(3, 400, am3517evm_ui_tca6516_info,
ARRAY_SIZE(am3517evm_ui_tca6516_info));

return 0;
}
Expand Down

0 comments on commit bc0d5e7

Please sign in to comment.