linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: PCA9564: "bus is not idle" issue
Date: Wed, 17 Mar 2010 13:59:03 +0100	[thread overview]
Message-ID: <f69abfc31003170559y3c0a5a6fi91c1ae7692700c66@mail.gmail.com> (raw)

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

             reply	other threads:[~2010-03-17 12:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 12:59 Yegor Yefremov [this message]
     [not found] ` <f69abfc31003170559y3c0a5a6fi91c1ae7692700c66-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-03-17 13:52   ` PCA9564: "bus is not idle" issue 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

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=f69abfc31003170559y3c0a5a6fi91c1ae7692700c66@mail.gmail.com \
    --to=yegorslists-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).