Skip to content

Commit

Permalink
ARM: OMAP1: Use I2C bus registration helper for omap1
Browse files Browse the repository at this point in the history
This patch starts using introduced I2C bus registration helper by cleaning
up registration currently done in various places and by doing necessary
board file modifications.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Jarkko Nikula authored and Tony Lindgren committed Feb 8, 2008
1 parent feb72f3 commit 1ed16a8
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ static void __init ams_delta_init(void)
omap_board_config = ams_delta_config;
omap_board_config_size = ARRAY_SIZE(ams_delta_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);

/* Clear latch2 (NAND, LCD, modem enable) */
ams_delta_latch2_write(~0, 0);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-fsample.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ static void __init omap_fsample_init(void)
omap_board_config = fsample_config;
omap_board_config_size = ARRAY_SIZE(fsample_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init fsample_init_smc91x(void)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ static void __init omap_generic_init(void)
omap_board_config = generic_config;
omap_board_config_size = ARRAY_SIZE(generic_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init omap_generic_map_io(void)
Expand Down
7 changes: 2 additions & 5 deletions arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,17 +458,14 @@ static void __init h2_init(void)
omap_board_config = h2_config;
omap_board_config_size = ARRAY_SIZE(h2_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, h2_i2c_board_info,
ARRAY_SIZE(h2_i2c_board_info));
h2_mmc_init();

/* irq for tps65010 chip */
omap_cfg_reg(W4_GPIO58);
if (gpio_request(58, "tps65010") == 0)
gpio_direction_input(58);

#ifdef CONFIG_I2C_BOARDINFO
i2c_register_board_info(1, h2_i2c_board_info,
ARRAY_SIZE(h2_i2c_board_info));
#endif
}

static void __init h2_map_io(void)
Expand Down
6 changes: 2 additions & 4 deletions arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,9 @@ static void __init h3_init(void)
omap_board_config = h3_config;
omap_board_config_size = ARRAY_SIZE(h3_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, h3_i2c_board_info,
ARRAY_SIZE(h3_i2c_board_info));
h3_mmc_init();

/* FIXME setup irq for tps65013 chip */
i2c_register_board_info(1, h3_i2c_board_info,
ARRAY_SIZE(h3_i2c_board_info));
}

static void __init h3_init_smc91x(void)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-innovator.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ static void __init innovator_init(void)
omap_board_config = innovator_config;
omap_board_config_size = ARRAY_SIZE(innovator_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init innovator_map_io(void)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-nokia770.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ static void __init omap_nokia770_init(void)
omap_board_config_size = ARRAY_SIZE(nokia770_config);
omap_gpio_init();
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
omap_dsp_init();
ads7846_dev_init();
mipid_dev_init();
Expand Down
5 changes: 2 additions & 3 deletions arch/arm/mach-omap1/board-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,9 @@ static void __init osk_init(void)
if (gpio_request(OMAP_MPUIO(1), "tps65010") == 0)
gpio_direction_input(OMAP_MPUIO(1));

i2c_register_board_info(1, osk_i2c_board_info,
ARRAY_SIZE(osk_i2c_board_info));

omap_serial_init();
omap_register_i2c_bus(1, 400, osk_i2c_board_info,
ARRAY_SIZE(osk_i2c_board_info));
osk_mistral_init();
}

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-palmte.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ static void __init omap_palmte_init(void)
spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));

omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
palmte_gpio_setup();
}

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-palmtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ static void __init omap_palmtt_init(void)

spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init omap_palmtt_map_io(void)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-palmz71.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ omap_palmz71_init(void)
spi_register_board_info(palmz71_boardinfo,
ARRAY_SIZE(palmz71_boardinfo));
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
palmz71_gpio_setup(0);
}

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-perseus2.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ static void __init omap_perseus2_init(void)
omap_board_config = perseus2_config;
omap_board_config_size = ARRAY_SIZE(perseus2_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
}

static void __init perseus2_init_smc91x(void)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-sx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ static void __init omap_sx1_init(void)
omap_board_config = sx1_config;
omap_board_config_size = ARRAY_SIZE(sx1_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
sx1_mmc_init();

/* turn on USB power */
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap1/board-voiceblue.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static void __init voiceblue_init(void)
omap_board_config = voiceblue_config;
omap_board_config_size = ARRAY_SIZE(voiceblue_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);

/* There is a good chance board is going up, so enable power LED
* (it is connected through invertor) */
Expand Down

0 comments on commit 1ed16a8

Please sign in to comment.