* 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
[parent not found: <f69abfc31003170559y3c0a5a6fi91c1ae7692700c66-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [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-04-03 16:29 ` Wolfram Sang 1 sibling, 1 reply; 15+ messages in thread From: Wolfram Sang @ 2010-03-17 13:52 UTC (permalink / raw) To: Yegor Yefremov; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 421 bytes --] On Wed, Mar 17, 2010 at 01:59:03PM +0100, Yegor Yefremov wrote: > Could this be the reason for such behavior? Any idea? Can you set the algo-module parameter i2c_debug to 3 and post the log for the transfer that failed, please? Regards, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100317135223.GD4153-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100317135223.GD4153-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-03-17 15:26 ` Yegor Yefremov [not found] ` <f69abfc31003170826j18fa0fddq1c46b8bcebf75c57-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Yegor Yefremov @ 2010-03-17 15:26 UTC (permalink / raw) To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA >> Could this be the reason for such behavior? Any idea? > > Can you set the algo-module parameter i2c_debug to 3 and post the log for the > transfer that failed, please? I've increased i2c_debug to 3 and now I get a lot of debug messages, but the error doesn't occur. These debug messages seem to influence the timing. Regards, Yegor ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <f69abfc31003170826j18fa0fddq1c46b8bcebf75c57-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <f69abfc31003170826j18fa0fddq1c46b8bcebf75c57-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-03-18 9:01 ` Yegor Yefremov [not found] ` <f69abfc31003180201m5c5e167enf8256c4843e0c6ba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Yegor Yefremov @ 2010-03-18 9:01 UTC (permalink / raw) To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA >>> Could this be the reason for such behavior? Any idea? >> >> Can you set the algo-module parameter i2c_debug to 3 and post the log for the >> transfer that failed, please? > > I've increased i2c_debug to 3 and now I get a lot of debug messages, > but the error doesn't occur. These debug messages seem to influence > the timing. If I don't redirect syslog to a remote host I get i2c fail. So here you are: === START STATE is 0x08 === SLAVE ADDRESS 0x68+W=0xd0 STATE is 0x18 === WRITE 0x00 STATE is 0x28 === REPEATED START STATE is 0x10 === SLAVE ADDRESS 0x68+R=0xd1 STATE is 0x40 STATE is 0x50 === READ 0x27 ACK STATE is 0x50 === READ 0x55 ACK STATE is 0x50 === READ 0x08 ACK STATE is 0x50 === READ 0x05 ACK STATE is 0x50 === READ 0x18 ACK STATE is 0x50 === READ 0x83 ACK STATE is 0x58 === READ 0x10 NACK === STOP }}} transfered 2/2 messages. status is 0x58. control is 0x55 i2c i2c-0: master_xfer[0] W, addr=0x68, len=1 i2c i2c-0: master_xfer[1] R, addr=0x68, len=7 {{{ XFER 2 messages [00] WR 1 bytes to 0x68 [0xd0, 0x00] [01] RD 7 bytes from 0x68 [0xd1, ...] STATE is 0xf8 === START STATE is 0x08 === SLAVE ADDRESS 0x68+W=0xd0 STATE is 0x18 === WRITE 0x00 STATE is 0x28 === REPEATED START STATE is 0x10 === SLAVE ADDRESS 0x68+R=0xd1 STATE is 0x40 STATE is 0x50 === READ 0x27 ACK STATE is 0x50 === READ 0x55 ACK STATE is 0x50 === READ 0x08 ACK STATE is 0x50 === READ 0x05 ACK STATE is 0x50 === READ 0x18 ACK STATE is 0x50 === READ 0x83 ACK STATE is 0x58 === READ 0x10 NACK === STOP }}} transfered 2/2 messages. status is 0x58. control is 0x55 i2c i2c-0: master_xfer[0] W, addr=0x68, len=1 i2c i2c-0: master_xfer[1] R, addr=0x68, len=7 {{{ XFER 2 messages [00] WR 1 bytes to 0x68 [0xd0, 0x00] [01] RD 7 bytes from 0x68 [0xd1, ...] STATE is 0xf8 === START STATE is 0x08 === SLAVE ADDRESS 0x68+W=0xd0 STATE is 0x18 === WRITE 0x00 STATE is 0x28 === REPEATED START STATE is 0x10 === SLAVE ADDRESS 0x68+R=0xd1 STATE is 0x40 STATE is 0x50 === READ 0x27 ACK STATE is 0x50 === READ 0x55 ACK STATE is 0x50 === READ 0x08 ACK STATE is 0x50 === READ 0x05 ACK STATE is 0x50 === READ 0x18 ACK STATE is 0x50 === READ 0x83 ACK STATE is 0x58 === READ 0x10 NACK === STOP }}} transfered 2/2 messages. status is 0x58. control is 0x55 i2c i2c-0: master_xfer[0] W, addr=0x68, len=1 i2c i2c-0: master_xfer[1] R, addr=0x68, len=7 {{{ XFER 2 messages [00] WR 1 bytes to 0x68 [0xd0, 0x00] [01] RD 7 bytes from 0x68 [0xd1, ...] STATE is 0xf8 === START STATE is 0x08 === SLAVE ADDRESS 0x68+W=0xd0 STATE is 0x18 === WRITE 0x00 STATE is 0x28 === REPEATED START STATE is 0x10 === SLAVE ADDRESS 0x68+R=0xd1 STATE is 0x40 STATE is 0x50 === READ 0x27 ACK STATE is 0x50 === READ 0x55 ACK STATE is 0x50 === READ 0x08 ACK STATE is 0x50 === READ 0x05 ACK }}} transfered 1/2 messages. status is 0x50. control is 0xcd rtc-ds1307 0-0068: read error -121 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 0x50 rtc-ds1307 0-0068: read error -11 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 0x50 As far as I can tell the last transaction lacks "=== STOP" state. Regards, Yegor ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <f69abfc31003180201m5c5e167enf8256c4843e0c6ba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <f69abfc31003180201m5c5e167enf8256c4843e0c6ba-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-03-18 9:19 ` Wolfram Sang [not found] ` <20100318091917.GA27165-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Wolfram Sang @ 2010-03-18 9:19 UTC (permalink / raw) To: Yegor Yefremov; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 586 bytes --] > If I don't redirect syslog to a remote host I get i2c fail. So here you are: Thanks! [...] > As far as I can tell the last transaction lacks "=== STOP" state. Yes. The bus-status being 0x58 instead of 0xf8 says that, too. I wanted to check if there is something flaky before. Will have a look, but will probably be the weekend. You said it does not appear when you use 2.6.26, right? Regards, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100318091917.GA27165-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100318091917.GA27165-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-03-18 9:51 ` Yegor Yefremov [not found] ` <f69abfc31003180251q53c96f8chc6b96d29c2ceec6d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Yegor Yefremov @ 2010-03-18 9:51 UTC (permalink / raw) To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA On Thu, Mar 18, 2010 at 10:19 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote: >> If I don't redirect syslog to a remote host I get i2c fail. So here you are: > > Thanks! > > [...] > >> As far as I can tell the last transaction lacks "=== STOP" state. > > Yes. The bus-status being 0x58 instead of 0xf8 says that, too. I wanted to > check if there is something flaky before. Will have a look, but will probably > be the weekend. You said it does not appear when you use 2.6.26, right? Right. Either it is so seldom, that I don't notice it or it doesn't occur. But with 2.6.33 it is really frequent. Regards, Yegor ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <f69abfc31003180251q53c96f8chc6b96d29c2ceec6d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <f69abfc31003180251q53c96f8chc6b96d29c2ceec6d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-03-29 14:31 ` Jean Delvare [not found] ` <20100329163149.41df7f10-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Jean Delvare @ 2010-03-29 14:31 UTC (permalink / raw) To: Yegor Yefremov; +Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA Wolram, Yegor, On Thu, 18 Mar 2010 10:51:09 +0100, Yegor Yefremov wrote: > On Thu, Mar 18, 2010 at 10:19 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote: > >> If I don't redirect syslog to a remote host I get i2c fail. So here you are: > > > > Thanks! > > > > [...] > > > >> As far as I can tell the last transaction lacks "=== STOP" state. > > > > Yes. The bus-status being 0x58 instead of 0xf8 says that, too. I wanted to > > check if there is something flaky before. Will have a look, but will probably > > be the weekend. You said it does not appear when you use 2.6.26, right? > > Right. Either it is so seldom, that I don't notice it or it doesn't > occur. But with 2.6.33 it is really frequent. Any progress on this? If this is a regression, we want to fix it quickly. Thanks, -- Jean Delvare ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100329163149.41df7f10-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100329163149.41df7f10-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> @ 2010-03-30 13:16 ` Yegor Yefremov 0 siblings, 0 replies; 15+ messages in thread From: Yegor Yefremov @ 2010-03-30 13:16 UTC (permalink / raw) To: Jean Delvare; +Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA >> >> If I don't redirect syslog to a remote host I get i2c fail. So here you are: >> > >> > Thanks! >> > >> > [...] >> > >> >> As far as I can tell the last transaction lacks "=== STOP" state. >> > >> > Yes. The bus-status being 0x58 instead of 0xf8 says that, too. I wanted to >> > check if there is something flaky before. Will have a look, but will probably >> > be the weekend. You said it does not appear when you use 2.6.26, right? >> >> Right. Either it is so seldom, that I don't notice it or it doesn't >> occur. But with 2.6.33 it is really frequent. > > Any progress on this? If this is a regression, we want to fix it > quickly. I'm not really further. But I use a workaround for my system by just using this revision: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.33.y.git;a=commit;h=eff9ec95efaaf6b12d230f0ea7d3c295d3bc9d57. With revision i2c is working quite stable. Regards, Yegor ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: PCA9564: "bus is not idle" issue [not found] ` <f69abfc31003170559y3c0a5a6fi91c1ae7692700c66-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2010-03-17 13:52 ` Wolfram Sang @ 2010-04-03 16:29 ` Wolfram Sang [not found] ` <20100403162939.GA2190-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 1 sibling, 1 reply; 15+ messages in thread From: Wolfram Sang @ 2010-04-03 16:29 UTC (permalink / raw) To: Yegor Yefremov; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 981 bytes --] On Wed, Mar 17, 2010 at 01:59:03PM +0100, Yegor Yefremov wrote: > 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: [...] > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ > .gpio = -1, > .i2c_clock_speed = 59000, > .timeout = 1, > }; Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. > 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? You were almost there, just use 'git log' next time. Kind regards, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100403162939.GA2190-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100403162939.GA2190-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-03 18:23 ` Jean Delvare [not found] ` <20100403202329.3bdb407c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Jean Delvare @ 2010-04-03 18:23 UTC (permalink / raw) To: Wolfram Sang; +Cc: Yegor Yefremov, linux-i2c-u79uwXL29TY76Z2rM5mHXA On Sat, 3 Apr 2010 18:29:39 +0200, Wolfram Sang wrote: > On Wed, Mar 17, 2010 at 01:59:03PM +0100, Yegor Yefremov wrote: > > 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: > > [...] > > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ > > .gpio = -1, > > .i2c_clock_speed = 59000, > > .timeout = 1, > > }; > > Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to > jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. > > > 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? > > You were almost there, just use 'git log' next time. So this means the bug isn't in the mainline kernel tree and I can ignore it? As a side note, arch/blackfin/mach-bf561/boards/acvilon.c sets timeout to 10000, so the actual timeout depends on the value of HZ, which is probably not desirable. Not to mention that a timeout of over one minute (worst case) doesn't seem too smart ;) -- Jean Delvare ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100403202329.3bdb407c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100403202329.3bdb407c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org> @ 2010-04-04 3:29 ` Wolfram Sang [not found] ` <20100404032929.GA12800-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Wolfram Sang @ 2010-04-04 3:29 UTC (permalink / raw) To: Jean Delvare; +Cc: Yegor Yefremov, linux-i2c-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1225 bytes --] > > > 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: > > > > [...] > > > > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ > > > .gpio = -1, > > > .i2c_clock_speed = 59000, > > > .timeout = 1, > > > }; > > > > Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to > > jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. > > So this means the bug isn't in the mainline kernel tree and I can > ignore it? A confirmation from Yegor would be nice, but his logs let me believe that this is really the cause. > As a side note, arch/blackfin/mach-bf561/boards/acvilon.c sets timeout > to 10000, so the actual timeout depends on the value of HZ, which is > probably not desirable. Not to mention that a timeout of over one > minute (worst case) doesn't seem too smart ;) There is also an i2c-gpio-user using non-HZ value. Will prepare patches. Regards, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100404032929.GA12800-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100404032929.GA12800-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-04 11:00 ` Yegor Yefremov [not found] ` <t2zf69abfc31004040400wc3330285pe5d4602d31e0a52b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Yegor Yefremov @ 2010-04-04 11:00 UTC (permalink / raw) To: Wolfram Sang; +Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA On Sun, Apr 4, 2010 at 5:29 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote: >> > > 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: >> > >> > [...] >> > >> > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ >> > > .gpio = -1, >> > > .i2c_clock_speed = 59000, >> > > .timeout = 1, >> > > }; >> > >> > Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to >> > jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. >> >> So this means the bug isn't in the mainline kernel tree and I can >> ignore it? > > A confirmation from Yegor would be nice, but his logs let me believe that > this is really the cause. > >> As a side note, arch/blackfin/mach-bf561/boards/acvilon.c sets timeout >> to 10000, so the actual timeout depends on the value of HZ, which is >> probably not desirable. Not to mention that a timeout of over one >> minute (worst case) doesn't seem too smart ;) > > There is also an i2c-gpio-user using non-HZ value. Will prepare patches. Thank for your solution. I'll try it on Tuesday and confirm ASAP. Happy Easter! Best regards, Yegor ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <t2zf69abfc31004040400wc3330285pe5d4602d31e0a52b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <t2zf69abfc31004040400wc3330285pe5d4602d31e0a52b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-04-06 7:48 ` Yegor Yefremov [not found] ` <j2pf69abfc31004060048z1b9500e1g9e12fb5bd794dc4a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Yegor Yefremov @ 2010-04-06 7:48 UTC (permalink / raw) To: Wolfram Sang; +Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA >>> > > 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: >>> > >>> > [...] >>> > >>> > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ >>> > > .gpio = -1, >>> > > .i2c_clock_speed = 59000, >>> > > .timeout = 1, >>> > > }; >>> > >>> > Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to >>> > jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. >>> >>> So this means the bug isn't in the mainline kernel tree and I can >>> ignore it? >> >> A confirmation from Yegor would be nice, but his logs let me believe that >> this is really the cause. >> >>> As a side note, arch/blackfin/mach-bf561/boards/acvilon.c sets timeout >>> to 10000, so the actual timeout depends on the value of HZ, which is >>> probably not desirable. Not to mention that a timeout of over one >>> minute (worst case) doesn't seem too smart ;) >> >> There is also an i2c-gpio-user using non-HZ value. Will prepare patches. > > Thank for your solution. I'll try it on Tuesday and confirm ASAP. Wolfram, do you mean so: static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ .gpio = -1, .i2c_clock_speed = 59000, .timeout = HZ, }; I've tried this, but with the same result. The bus is still not idle. Regards, Yegor ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <j2pf69abfc31004060048z1b9500e1g9e12fb5bd794dc4a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <j2pf69abfc31004060048z1b9500e1g9e12fb5bd794dc4a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-04-06 7:52 ` Wolfram Sang [not found] ` <20100406075208.GA5102-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Wolfram Sang @ 2010-04-06 7:52 UTC (permalink / raw) To: Yegor Yefremov; +Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1862 bytes --] On Tue, Apr 06, 2010 at 09:48:49AM +0200, Yegor Yefremov wrote: > >>> > > 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: > >>> > > >>> > [...] > >>> > > >>> > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ > >>> > > .gpio = -1, > >>> > > .i2c_clock_speed = 59000, > >>> > > .timeout = 1, > >>> > > }; > >>> > > >>> > Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to > >>> > jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. > >>> > >>> So this means the bug isn't in the mainline kernel tree and I can > >>> ignore it? > >> > >> A confirmation from Yegor would be nice, but his logs let me believe that > >> this is really the cause. > >> > >>> As a side note, arch/blackfin/mach-bf561/boards/acvilon.c sets timeout > >>> to 10000, so the actual timeout depends on the value of HZ, which is > >>> probably not desirable. Not to mention that a timeout of over one > >>> minute (worst case) doesn't seem too smart ;) > >> > >> There is also an i2c-gpio-user using non-HZ value. Will prepare patches. > > > > Thank for your solution. I'll try it on Tuesday and confirm ASAP. > > Wolfram, do you mean so: > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ > .gpio = -1, > .i2c_clock_speed = 59000, > .timeout = HZ, > }; > > I've tried this, but with the same result. The bus is still not idle. That's bad news :(( Did you notice a difference in behaviour? There should be a 1 second delay now before the message arises... -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20100406075208.GA5102-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: PCA9564: "bus is not idle" issue [not found] ` <20100406075208.GA5102-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-06 8:04 ` Yegor Yefremov 0 siblings, 0 replies; 15+ messages in thread From: Yegor Yefremov @ 2010-04-06 8:04 UTC (permalink / raw) To: Wolfram Sang; +Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA >> >>> > > 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: >> >>> > >> >>> > [...] >> >>> > >> >>> > > static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ >> >>> > > .gpio = -1, >> >>> > > .i2c_clock_speed = 59000, >> >>> > > .timeout = 1, >> >>> > > }; >> >>> > >> >>> > Commit 8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 changed the timeout settings to >> >>> > jiffies. So, one jiffy as timeout will not work. Try 'HZ' here. >> >>> >> >>> So this means the bug isn't in the mainline kernel tree and I can >> >>> ignore it? >> >> >> >> A confirmation from Yegor would be nice, but his logs let me believe that >> >> this is really the cause. >> >> >> >>> As a side note, arch/blackfin/mach-bf561/boards/acvilon.c sets timeout >> >>> to 10000, so the actual timeout depends on the value of HZ, which is >> >>> probably not desirable. Not to mention that a timeout of over one >> >>> minute (worst case) doesn't seem too smart ;) >> >> >> >> There is also an i2c-gpio-user using non-HZ value. Will prepare patches. >> > >> > Thank for your solution. I'll try it on Tuesday and confirm ASAP. >> >> Wolfram, do you mean so: >> >> static struct i2c_pca9564_pf_platform_data __initdata pca_data ={ >> .gpio = -1, >> .i2c_clock_speed = 59000, >> .timeout = HZ, >> }; >> >> I've tried this, but with the same result. The bus is still not idle. > > That's bad news :(( Did you notice a difference in behaviour? There should be a > 1 second delay now before the message arises... Yes, I can confirm this delay. But apart from these delay I can't see any difference in behavior. 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).