aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-igep0020.c
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@gmail.com>2010-10-08 13:22:51 -0400
committerTony Lindgren <tony@atomide.com>2010-10-08 13:22:51 -0400
commit91d139cf3630eff73f161494ee0c596472c11fef (patch)
tree5f22ffde4ad8c7f47c887b7e077bf201f10b5fe6 /arch/arm/mach-omap2/board-igep0020.c
parent5a9fcc9980ae741c4657029c7e92d914072f824a (diff)
omap3: Add i2c eeprom driver to read EDID on IGEP v2
Add i2c eeprom driver to access monitor EDID binary information from user space, something that is required by 'decode-edid' and 'parse-edid'. Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0020.c')
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 22f73b4e0b43..cfd67bf0acd9 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -542,7 +542,7 @@ static struct twl4030_platform_data igep2_twldata = {
542 542
543}; 543};
544 544
545static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = { 545static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {
546 { 546 {
547 I2C_BOARD_INFO("twl4030", 0x48), 547 I2C_BOARD_INFO("twl4030", 0x48),
548 .flags = I2C_CLIENT_WAKE, 548 .flags = I2C_CLIENT_WAKE,
@@ -551,14 +551,29 @@ static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = {
551 }, 551 },
552}; 552};
553 553
554static int __init igep2_i2c_init(void) 554static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
555 {
556 I2C_BOARD_INFO("eeprom", 0x50),
557 },
558};
559
560static void __init igep2_i2c_init(void)
555{ 561{
556 omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo, 562 int ret;
557 ARRAY_SIZE(igep2_i2c_boardinfo)); 563
558 /* Bus 3 is attached to the DVI port where devices like the pico DLP 564 ret = omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo,
559 * projector don't work reliably with 400kHz */ 565 ARRAY_SIZE(igep2_i2c1_boardinfo));
560 omap_register_i2c_bus(3, 100, NULL, 0); 566 if (ret)
561 return 0; 567 pr_warning("IGEP2: Could not register I2C1 bus (%d)\n", ret);
568
569 /*
570 * Bus 3 is attached to the DVI port where devices like the pico DLP
571 * projector don't work reliably with 400kHz
572 */
573 ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
574 ARRAY_SIZE(igep2_i2c3_boardinfo));
575 if (ret)
576 pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
562} 577}
563 578
564static struct omap_musb_board_data musb_board_data = { 579static struct omap_musb_board_data musb_board_data = {
@@ -636,7 +651,7 @@ static void __init igep2_init(void)
636 651
637 /* Get IGEP2 hardware revision */ 652 /* Get IGEP2 hardware revision */
638 igep2_get_revision(); 653 igep2_get_revision();
639 654 /* Register I2C busses and drivers */
640 igep2_i2c_init(); 655 igep2_i2c_init();
641 platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); 656 platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
642 omap_serial_init(); 657 omap_serial_init();