From: eballetbo@gmail.com (Enric Balletbo i Serra)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 5/6] omap3: Add i2c eeprom driver to read EDID on IGEP v2.
Date: Tue, 5 Oct 2010 16:15:21 +0200 [thread overview]
Message-ID: <1286288122-16834-6-git-send-email-eballetbo@gmail.com> (raw)
In-Reply-To: <1286288122-16834-1-git-send-email-eballetbo@gmail.com>
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>
---
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 ddc740a..aa7b8bd 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();
--
1.7.0.4
next prev parent reply other threads:[~2010-10-05 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 14:15 [PATCHv4 0/6] omap3: Various fixes and improvements for IGEP v2 board Enric Balletbo i Serra
2010-10-05 14:15 ` [PATCHv4 1/6] omap3: Add external VBUS power switch and overcurrent detect on " Enric Balletbo i Serra
2010-10-05 14:15 ` [PATCHv4 2/6] omap3: fix and improve the LED handling " Enric Balletbo i Serra
2010-10-05 14:15 ` [PATCHv4 3/6] omap3: Introduce function to detect the IGEP v2 hardware revision Enric Balletbo i Serra
2010-10-05 14:15 ` [PATCHv4 4/6] omap3: Fix handling some GPIO's for WLAN-BT combo on IGEP v2 Enric Balletbo i Serra
2010-10-05 14:15 ` Enric Balletbo i Serra [this message]
2010-10-05 14:15 ` [PATCHv4 6/6] omap3: Remove VMMC2 regulator " Enric Balletbo i Serra
2010-10-05 18:15 ` [PATCHv4 0/6] omap3: Various fixes and improvements for IGEP v2 board Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286288122-16834-6-git-send-email-eballetbo@gmail.com \
--to=eballetbo@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).