提交 b91da669 编写于 作者: S stanley.miao 提交者: Tony Lindgren

AM3517: rename the i2c boardinfo to make it more readable

There are three i2c buses on am3517, and each i2c bus has several devices
on it, so we can't name the i2c boardinfo structures with one of these
devices. In order to make it more readable, now rename these three boardinfo
structures based on i2c indexes.
Signed-off-by: NStanley.Miao <stanley.miao@windriver.com>
Acked-By: NVaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 9f096868
...@@ -136,7 +136,7 @@ void am3517_evm_ethernet_init(struct emac_platform_data *pdata) ...@@ -136,7 +136,7 @@ void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
#define LCD_PANEL_BKLIGHT_PWR 182 #define LCD_PANEL_BKLIGHT_PWR 182
#define LCD_PANEL_PWM 181 #define LCD_PANEL_PWM 181
static struct i2c_board_info __initdata am3517evm_i2c_boardinfo[] = { static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = {
{ {
I2C_BOARD_INFO("s35390a", 0x30), I2C_BOARD_INFO("s35390a", 0x30),
.type = "s35390a", .type = "s35390a",
...@@ -166,7 +166,7 @@ static void __init am3517_evm_rtc_init(void) ...@@ -166,7 +166,7 @@ static void __init am3517_evm_rtc_init(void)
gpio_free(GPIO_RTCS35390A_IRQ); gpio_free(GPIO_RTCS35390A_IRQ);
return; return;
} }
am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ); am3517evm_i2c1_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ);
} }
/* /*
...@@ -177,7 +177,7 @@ static void __init am3517_evm_rtc_init(void) ...@@ -177,7 +177,7 @@ static void __init am3517_evm_rtc_init(void)
static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = { static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
.gpio_base = OMAP_MAX_GPIO_LINES, .gpio_base = OMAP_MAX_GPIO_LINES,
}; };
static struct i2c_board_info __initdata am3517evm_tca6416_info_0[] = { static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
{ {
I2C_BOARD_INFO("tca6416", 0x21), I2C_BOARD_INFO("tca6416", 0x21),
.platform_data = &am3517evm_gpio_expander_info_0, .platform_data = &am3517evm_gpio_expander_info_0,
...@@ -191,7 +191,7 @@ static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = { ...@@ -191,7 +191,7 @@ static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = {
static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = { static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
.gpio_base = OMAP_MAX_GPIO_LINES + 32, .gpio_base = OMAP_MAX_GPIO_LINES + 32,
}; };
static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = { static struct i2c_board_info __initdata am3517evm_i2c3_boardinfo[] = {
{ {
I2C_BOARD_INFO("tca6416", 0x20), I2C_BOARD_INFO("tca6416", 0x20),
.platform_data = &am3517evm_ui_gpio_expander_info_1, .platform_data = &am3517evm_ui_gpio_expander_info_1,
...@@ -205,10 +205,10 @@ static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = { ...@@ -205,10 +205,10 @@ static struct i2c_board_info __initdata am3517evm_ui_tca6416_info[] = {
static int __init am3517_evm_i2c_init(void) static int __init am3517_evm_i2c_init(void)
{ {
omap_register_i2c_bus(1, 400, NULL, 0); omap_register_i2c_bus(1, 400, NULL, 0);
omap_register_i2c_bus(2, 400, am3517evm_tca6416_info_0, omap_register_i2c_bus(2, 400, am3517evm_i2c2_boardinfo,
ARRAY_SIZE(am3517evm_tca6416_info_0)); ARRAY_SIZE(am3517evm_i2c2_boardinfo));
omap_register_i2c_bus(3, 400, am3517evm_ui_tca6416_info, omap_register_i2c_bus(3, 400, am3517evm_i2c3_boardinfo,
ARRAY_SIZE(am3517evm_ui_tca6416_info)); ARRAY_SIZE(am3517evm_i2c3_boardinfo));
return 0; return 0;
} }
...@@ -455,8 +455,8 @@ static void __init am3517_evm_init(void) ...@@ -455,8 +455,8 @@ static void __init am3517_evm_init(void)
/* RTC - S35390A */ /* RTC - S35390A */
am3517_evm_rtc_init(); am3517_evm_rtc_init();
i2c_register_board_info(1, am3517evm_i2c_boardinfo, i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
ARRAY_SIZE(am3517evm_i2c_boardinfo)); ARRAY_SIZE(am3517evm_i2c1_boardinfo));
/*Ethernet*/ /*Ethernet*/
am3517_evm_ethernet_init(&am3517_evm_emac_pdata); am3517_evm_ethernet_init(&am3517_evm_emac_pdata);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册