linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCA9564: "bus is not idle" issue
@ 2010-03-17 12:59 Yegor Yefremov
       [not found] ` <f69abfc31003170559y3c0a5a6fi91c1ae7692700c66-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Yegor Yefremov @ 2010-03-17 12:59 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi,

I'm using PCA9564 attached to a ks8695 SoC. During my efforts to get
2.6.33/34 running on my system I noticed sporadic problems with RTC:

rtc-ds1307 0-0068: read error -11
RTC_RD_TIME: Input/output error
ioctl() to /dev/rtc to read the time failed.

After turning debug messages in i2c subsystem I got following info:

i2c i2c-0: master_xfer[0] W, addr=0x68, len=1
i2c i2c-0: master_xfer[1] R, addr=0x68, len=7
i2c i2c-0: bus is not idle. status is 0x28 (sometimes it is 0x50 or 0x58)

This is the way I configure RTC and I2C:

/*****************************************************************************
 * RTC DS1337 on I2C bus
 ****************************************************************************/
static struct i2c_board_info __initdata vsopenrisc_i2c_rtc = {
		I2C_BOARD_INFO("ds1337", 0x68),
};
static struct i2c_pca9564_pf_platform_data  __initdata pca_data ={
	    .gpio = -1,
	    .i2c_clock_speed = 59000,
	    .timeout = 1,
};

static struct resource pca_resources[] = {
	[0] = {
		 .start	= VSOPENRISC_PA_I2C_BASE,
		 .end	= VSOPENRISC_PA_I2C_BASE + 0x400 - 1,
		 .flags	= IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
   	},
	[1] = {
		.start	= 0,
		.end	= 0,
		.flags	= IORESOURCE_IRQ,
	},
};

static struct platform_device vsopenrisc_pca_device = {
	.name		= "i2c-pca-platform",
	.id		= -1,
	.dev		= {
			    .platform_data	= &pca_data,
			},
	.resource	= pca_resources,
	.num_resources	= ARRAY_SIZE(pca_resources),
};

With the older kernel 2.6.26 I have never encountered such problems
before. Diffing i2c-algo-pca.c between 2.6.26 and 2.6.33 showed that
there were some minor changes regarding waiting policy in pca_xfer().
Could this be the reason for such behavior? Any idea?

Regards,
Yegor

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

end of thread, other threads:[~2010-04-06  8:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 12:59 PCA9564: "bus is not idle" issue Yegor Yefremov
     [not found] ` <f69abfc31003170559y3c0a5a6fi91c1ae7692700c66-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-17 13:52   ` Wolfram Sang
     [not found]     ` <20100317135223.GD4153-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-17 15:26       ` Yegor Yefremov
     [not found]         ` <f69abfc31003170826j18fa0fddq1c46b8bcebf75c57-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-18  9:01           ` Yegor Yefremov
     [not found]             ` <f69abfc31003180201m5c5e167enf8256c4843e0c6ba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-18  9:19               ` Wolfram Sang
     [not found]                 ` <20100318091917.GA27165-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-18  9:51                   ` Yegor Yefremov
     [not found]                     ` <f69abfc31003180251q53c96f8chc6b96d29c2ceec6d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-29 14:31                       ` Jean Delvare
     [not found]                         ` <20100329163149.41df7f10-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-30 13:16                           ` Yegor Yefremov
2010-04-03 16:29   ` Wolfram Sang
     [not found]     ` <20100403162939.GA2190-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-03 18:23       ` Jean Delvare
     [not found]         ` <20100403202329.3bdb407c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-04-04  3:29           ` Wolfram Sang
     [not found]             ` <20100404032929.GA12800-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-04 11:00               ` Yegor Yefremov
     [not found]                 ` <t2zf69abfc31004040400wc3330285pe5d4602d31e0a52b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-06  7:48                   ` Yegor Yefremov
     [not found]                     ` <j2pf69abfc31004060048z1b9500e1g9e12fb5bd794dc4a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-06  7:52                       ` Wolfram Sang
     [not found]                         ` <20100406075208.GA5102-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-06  8:04                           ` Yegor Yefremov

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).