public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Re: N800 problems with MMC, LM8323 on current linux-omap git head
@ 2008-07-22 12:47 Riku Voipio
  2008-07-22 12:52 ` Felipe Balbi
  0 siblings, 1 reply; 15+ messages in thread
From: Riku Voipio @ 2008-07-22 12:47 UTC (permalink / raw)
  To: me, linux-omap

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

> Subject: [PATCH] input: add more error checks to lm8323 driver

> If we can't reach the driver, we stop trying to probe
> it. Useful when building kernel for n800 and n810.

> n800 doesn't have lm8323, so that driver shouldn't probe
> there.

Hmm. I think it would be better to avoid calling the probe
in first place. git diff made the attached patch look more
confusing than it actually is. Personally I'd eliminate
all ifdefs from those i2c_board_info structs.


-- 
"rm -rf" only sounds scary if you don't have backups

[-- Attachment #2: 0001-Separate-i2c_board_info-for-n800-and-n810.patch --]
[-- Type: text/plain, Size: 1988 bytes --]

>From 574835f1532f0be01e0456f98bf13ebb954bc6c3 Mon Sep 17 00:00:00 2001
From: Riku Voipio <riku.voipio@iki.fi>
Date: Tue, 22 Jul 2008 00:29:31 +0300
Subject: [PATCH] Separate i2c_board_info for n800 and n810

n800 and n810 have different peripherals, on the second i2c bus
(tea5761 on n800 and lm8323 on n810). Thus they need different
i2c_board_info as well to avoid probing nonexistent devices.
---
 arch/arm/mach-omap2/board-n800.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index ae85c2c..95a2727 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -654,13 +654,26 @@ static struct i2c_board_info __initdata_or_module n800_i2c_board_info_2[] = {
 		I2C_BOARD_INFO("tea5761", 0x10),
 	},
 #endif
-#ifdef CONFIG_MACH_NOKIA_N810
+	{
+		I2C_BOARD_INFO("tsl2563", 0x29),
+	},
+	{
+		I2C_BOARD_INFO("lp5521", 0x32),
+	},
+};
+
+static struct i2c_board_info __initdata_or_module n810_i2c_board_info_2[] = {
+#if defined (CONFIG_VIDEO_TCM825X) || defined (CONFIG_VIDEO_TCM825X_MODULE)
+	{
+		I2C_BOARD_INFO(TCM825X_NAME, TCM825X_I2C_ADDR),
+		.platform_data = &n800_tcm825x_platform_data,
+	},
+#endif
 	{
 		I2C_BOARD_INFO("lm8323", 0x45),
 		.irq		= OMAP_GPIO_IRQ(109),
 		.platform_data	= &lm8323_pdata,
 	},
-#endif
 	{
 		I2C_BOARD_INFO("tsl2563", 0x29),
 	},
@@ -690,8 +703,13 @@ void __init nokia_n800_common_init(void)
 	omap_serial_init();
 	omap_register_i2c_bus(1, 400, n800_i2c_board_info_1,
 			      ARRAY_SIZE(n800_i2c_board_info_1));
-	omap_register_i2c_bus(2, 400, n800_i2c_board_info_2,
+	if (machine_is_nokia_n800())
+		omap_register_i2c_bus(2, 400, n800_i2c_board_info_2,
 			      ARRAY_SIZE(n800_i2c_board_info_2));
+	if (machine_is_nokia_n810())
+		omap_register_i2c_bus(2, 400, n810_i2c_board_info_2,
+			      ARRAY_SIZE(n810_i2c_board_info_2));
+		
 	mipid_dev_init();
 	blizzard_dev_init();
 }
-- 
1.5.5.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* N800 problems with MMC, LM8323 on current linux-omap git head
@ 2008-07-18  3:25 Paul Walmsley
  2008-07-18  6:47 ` Kai Svahn
  2008-07-18  8:45 ` Felipe Balbi
  0 siblings, 2 replies; 15+ messages in thread
From: Paul Walmsley @ 2008-07-18  3:25 UTC (permalink / raw)
  To: linux-omap; +Cc: felipe.balbi, jarkko.lavinen, tony


Hello everyone,

noticed a few issues booting the N800 with the current git head
d3b3ae0fe6c71641da19c8de466ec366d39847e3 today.  Haven't booted the N800 
for a while, so not sure when these showed up.

Looks like there is some LM8323 problem - suppose it could be an I2C 
problem:

[    4.384094] lm8323 2-0045: sent 2 bytes of -121 total
[    4.389312] lm8323 2-0045: sending read cmd 0x82 failed
[    4.394775] lm8323 2-0045: sent 2 bytes of -121 total
[    4.400024] lm8323 2-0045: sent 2 bytes of -121 total
[    4.405212] lm8323 2-0045: sent 2 bytes of -121 total
[    4.410614] lm8323 2-0045: sent 2 bytes of -121 total
[    4.415985] lm8323 2-0045: sent 2 bytes of -121 total
[    4.421325] lm8323 2-0045: sent 3 bytes of -121 total
[    4.426696] lm8323 2-0045: sent 3 bytes of -121 total
[    4.432067] lm8323 2-0045: sending read cmd 0x80 failed
[    4.437316] lm8323 2-0045: device not found

Also MMC looks like something may be wrong:

[    4.524597] mmci-omap mmci-omap.1: command timeout (CMD8)
[    4.530059] mmci-omap mmci-omap.1: command timeout (CMD8)
[    4.536224] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.542327] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.547790] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.553894] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.559326] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.565429] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.570892] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.581481] mmci-omap mmci-omap.1: command timeout (CMD8)
[    4.586914] mmci-omap mmci-omap.1: command timeout (CMD8)

... and then later ...

[    4.866729] mmc0: host does not support reading read-only switch. 
assuming write-enable.
[    4.874969] mmc0: new SD card at address e624
[    4.881042] mmcblk0: mmc0:e624 SD128 123008KiB
[    4.886077]  mmcblk0: p1
[    4.915222] mmci-omap mmci-omap.1: command timeout (CMD8)
[    4.920684] mmci-omap mmci-omap.1: command timeout (CMD8)
[    4.926818] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.932312] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.938415] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.944519] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.949981] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.956085] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.961547] mmci-omap mmci-omap.1: command timeout (CMD5)
[    4.967681] mmci-omap mmci-omap.1: command timeout (CMD55)
[    4.973236] mmci-omap mmci-omap.1: command timeout (CMD55)
[    4.979095] omap24xxcam omap24xxcam: sensor is tcm825x
[    4.984283] mmci-omap mmci-omap.1: command timeout (CMD55)
[    4.990539] mmci-omap mmci-omap.1: command timeout (CMD55)
[    4.996765] mmci-omap mmci-omap.1: command timeout (CMD55)
[    5.002319] mmci-omap mmci-omap.1: command timeout (CMD55)
[    5.008575] mmci-omap mmci-omap.1: command timeout (CMD1)


Something is also wrong with audio - no touchscreen clicks play.

- Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-08-04 14:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 12:47 N800 problems with MMC, LM8323 on current linux-omap git head Riku Voipio
2008-07-22 12:52 ` Felipe Balbi
2008-07-22 13:37   ` Riku Voipio
2008-07-22 13:43     ` [i2c] " Ben Dooks
2008-07-22 14:20       ` Felipe Balbi
2008-07-23  9:38         ` Riku Voipio
2008-07-23 10:10           ` Felipe Balbi
2008-08-04 14:42             ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-07-18  3:25 Paul Walmsley
2008-07-18  6:47 ` Kai Svahn
2008-07-18  8:45 ` Felipe Balbi
2008-07-18  8:49   ` Paul Walmsley
2008-07-18  9:00     ` Felipe Balbi
2008-07-18  9:11     ` Kai Svahn
2008-07-18  9:22     ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox