From patchwork Mon Oct 11 16:37:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 67441 X-Patchwork-Delegate: brad.figg@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 9AA12B6F10 for ; Tue, 12 Oct 2010 03:37:33 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5LNR-0004TY-0w; Mon, 11 Oct 2010 17:37:29 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5LNP-0004TH-3t for kernel-team@lists.ubuntu.com; Mon, 11 Oct 2010 17:37:27 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P5LNP-0002Ri-2Z for ; Mon, 11 Oct 2010 17:37:27 +0100 Received: from s0106002369de4dac.cg.shawcable.net ([70.73.24.112] helo=[192.168.1.100]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P5LNO-00011y-N5 for kernel-team@lists.ubuntu.com; Mon, 11 Oct 2010 17:37:27 +0100 Subject: [Maverick SRU][PATCH 5/6] UBUNTU - ARM: igepv2: Add i2c eeprom driver to read EDID From: Mathieu Poirier To: kernel-team@lists.ubuntu.com Date: Mon, 11 Oct 2010 10:37:24 -0600 Message-ID: <1286815044.3125.36.camel@black> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com SRU Justification: Impact: This patch is part of a series of fix for the IGEPv2 board. The monitor's EDID information needs to be exported to userspace for application such as 'decode-edid' and 'parse-edid' to decode. Fix: To do this a 3rd "i2c_board_info" instance is declared and initialized in "igep2_i2c_init", part of the board initialization sequence. Testcase: Without this patch, 'decode-edid' and 'parse-edid' will return error messages. Otherwise the monitor' specific EDID information is displayed. >From b6f76df83460c0b8b34f25061f244ae3f0cc6c5e Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 11 Oct 2010 10:14:10 -0600 Subject: [PATCH 5/6] UBUNTU - ARM: igepv2: Add i2c eeprom driver to read EDID Add i2c eeprom driver to access monitor EDID binary information from user space, something that is required by 'decode-edid' and 'parse-edid'. This work was tested by the community and also been submitted here: http://marc.info/?l=linux-omap&m=128628829819054&w=2 BugLink: https://bugs.launchpad.net/bugs/654594 Signed-off-by: Enric Balletbo i Serra Signed-off-by: Mathieu J Poirier Signed-off-by: Lee Jones --- arch/arm/mach-omap2/board-igep0020.c | 33 ++++++++++++++++++++++++--------- 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 1047477..600a40a 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -541,7 +541,7 @@ static struct twl4030_platform_data igep2_twldata = { }; -static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = { +static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = { { I2C_BOARD_INFO("twl4030", 0x48), .flags = I2C_CLIENT_WAKE, @@ -550,14 +550,29 @@ static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = { }, }; -static int __init igep2_i2c_init(void) +static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = { + { + I2C_BOARD_INFO("eeprom", 0x50), + }, +}; + +static void __init igep2_i2c_init(void) { - omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo, - ARRAY_SIZE(igep2_i2c_boardinfo)); - /* Bus 3 is attached to the DVI port where devices like the pico DLP - * projector don't work reliably with 400kHz */ - omap_register_i2c_bus(3, 100, NULL, 0); - return 0; + int ret; + + ret = omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo, + ARRAY_SIZE(igep2_i2c1_boardinfo)); + if (ret) + pr_warning("IGEP2: Could not register I2C1 bus (%d)\n", ret); + + /* + * Bus 3 is attached to the DVI port where devices like the pico DLP + * projector don't work reliably with 400kHz + */ + ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo, + ARRAY_SIZE(igep2_i2c3_boardinfo)); + if (ret) + pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); } static struct omap_musb_board_data musb_board_data = { @@ -635,7 +650,7 @@ static void __init igep2_init(void) /* Get IGEP2 hardware revision */ igep2_get_revision(); - + /* Register I2C busses and drivers */ igep2_i2c_init(); platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); omap_serial_init();