Patchwork UBUNTU : SAUCE - ARM: adding i2c eeprom driver to read EDID

login
register
mail settings
Submitter Mathieu Poirier
Date Aug. 20, 2010, 8:51 p.m.
Message ID <1282337478.5433.10.camel@black>
Download mbox | patch
Permalink /patch/62317/
State Accepted
Delegated to: Leann Ogasawara
Headers show

Comments

Mathieu Poirier - Aug. 20, 2010, 8:51 p.m.
>From 7d0d86809864cb852988a296b12dff6436c45480 Mon Sep 17 00:00:00 2001
From: Mathieu J. Poirier <mathieu.poirier@canonical.com>
Date: Fri, 20 Aug 2010 14:25:53 -0600
Subject: [PATCH] UBUNTU - ARM: adding i2c eeprom driver to read EDID

Adding i2c eeprom driver to access monitor EDID binary information
from user space, something that is required by 'decode-edid' and
'parse-edid'.

BugLink: https://bugs.launchpad.net/bugs/608279

Signed-off-by: Mathieu Poirier <mathieu.poirier@canonical.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
Tim Gardner - Aug. 23, 2010, 5:46 p.m.
On 08/20/2010 02:51 PM, Mathieu Poirier wrote:
>> From 7d0d86809864cb852988a296b12dff6436c45480 Mon Sep 17 00:00:00 2001
> From: Mathieu J. Poirier<mathieu.poirier@canonical.com>
> Date: Fri, 20 Aug 2010 14:25:53 -0600
> Subject: [PATCH] UBUNTU - ARM: adding i2c eeprom driver to read EDID
>
> Adding i2c eeprom driver to access monitor EDID binary information
> from user space, something that is required by 'decode-edid' and
> 'parse-edid'.
>
> BugLink: https://bugs.launchpad.net/bugs/608279
>
> Signed-off-by: Mathieu Poirier<mathieu.poirier@canonical.com>
> ---
>   arch/arm/mach-omap2/board-omap3beagle.c |    8 +++++++-
>   1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7a1b351..fb6cbb9 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -355,13 +355,19 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
>   	},
>   };
>
> +static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
> +       {
> +               I2C_BOARD_INFO("eeprom", 0x50),
> +       },
> +};
> +
>   static int __init omap3_beagle_i2c_init(void)
>   {
>   	omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
>   			ARRAY_SIZE(beagle_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);
> +	omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
>   	return 0;
>   }
>

Have you bugged the Linaro folks about this? It seems like a useful 
feature to me.

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara - Aug. 24, 2010, 12:11 a.m.
Applied to Maverick linux master.

Thanks,
Leann

On Fri, 2010-08-20 at 14:51 -0600, Mathieu Poirier wrote:
> >From 7d0d86809864cb852988a296b12dff6436c45480 Mon Sep 17 00:00:00 2001
> From: Mathieu J. Poirier <mathieu.poirier@canonical.com>
> Date: Fri, 20 Aug 2010 14:25:53 -0600
> Subject: [PATCH] UBUNTU - ARM: adding i2c eeprom driver to read EDID
> 
> Adding i2c eeprom driver to access monitor EDID binary information
> from user space, something that is required by 'decode-edid' and
> 'parse-edid'.
> 
> BugLink: https://bugs.launchpad.net/bugs/608279
> 
> Signed-off-by: Mathieu Poirier <mathieu.poirier@canonical.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7a1b351..fb6cbb9 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -355,13 +355,19 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
>  	},
>  };
>  
> +static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
> +       {
> +               I2C_BOARD_INFO("eeprom", 0x50),
> +       },
> +};
> +
>  static int __init omap3_beagle_i2c_init(void)
>  {
>  	omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
>  			ARRAY_SIZE(beagle_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);
> +	omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
>  	return 0;
>  }
>  
> -- 
> 1.7.0.4
> 
> 
> 
>

Patch

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7a1b351..fb6cbb9 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -355,13 +355,19 @@  static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
 	},
 };
 
+static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
+       {
+               I2C_BOARD_INFO("eeprom", 0x50),
+       },
+};
+
 static int __init omap3_beagle_i2c_init(void)
 {
 	omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
 			ARRAY_SIZE(beagle_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);
+	omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
 	return 0;
 }