All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darius Augulis <augulis.darius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Guennadi Liakhovetski <g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>
Cc: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/5] I2C driver for MXC
Date: Mon, 30 Mar 2009 12:03:32 +0300	[thread overview]
Message-ID: <49D08AE4.1090102@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0903301156060.4455-0199iw4Nj15frtckUFj5Ag@public.gmane.org>

Guennadi Liakhovetski wrote:
> On Mon, 30 Mar 2009, Sascha Hauer wrote:
>
>   
>> On Mon, Mar 30, 2009 at 11:26:31AM +0200, Guennadi Liakhovetski wrote:
>>     
>>> Well, I have been able to get your driver to at least pass the 
>>> initialisation with mt9t031 (other parts are missing yet for a complete 
>>> test). For that I used this silly patch:
>>>
>>> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
>>> index 3296380..46e1033 100644
>>> --- a/drivers/i2c/busses/i2c-imx.c
>>> +++ b/drivers/i2c/busses/i2c-imx.c
>>> @@ -371,6 +371,8 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
>>>  	if (result)
>>>  		goto fail0;
>>>  
>>> +	msleep(2);
>>> +
>>>  	/* Start I2C transfer */
>>>  	i2c_imx_start(i2c_imx);
>>>
>>> As you understand, this cannot be the final fix. We have to understand why 
>>> a delay is needed there and how long it actually has to be...
>>>  
>>>       
>> Have you checked the value of disable_delay in Darius' driver or tried to
>> increase it?
>>     
>
> Why? That variable is addreccing a problem on a completely different 
> hardware:
>
> 	/*
> 	 * There dummy delay is calculated.
> 	 * It should be about one I2C clock period long.
> 	 * This delay is used in I2C bus disable function
> 	 * to fix chip hardware bug.
> 	 */
>
> and is used on a different path - during controller disable.
>   

Freescale datasheet don't specifies any timing requirement when 
disabling I2C module.
If I disable it immediately after generating STOP signal, it's not 
generated.
When one clock delay is used, problem is solved. So I guess it is 
hardware bug.
Strange, why your driver works without that.

>   
>> BTW I just realized that the handling of disable_delay in Darius' driver
>> is wrong. This should be a per device variable.
>>     
>
> Indeed.
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
>
>   

  parent reply	other threads:[~2009-03-30  9:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24  8:47 [PATCH 1/5] I2C driver for MXC Darius
     [not found] ` <49C89E13.7040801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-24  9:42   ` Wolfram Sang
     [not found]     ` <20090324094215.GA3471-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-03-24  9:46       ` Darius
     [not found]         ` <49C8ABE5.40408-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-25  9:26           ` Wolfram Sang
     [not found]             ` <20090325092625.GA3029-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-03-25 10:03               ` Darius Augulis
     [not found]                 ` <49CA017D.20005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-25 10:43                   ` Wolfram Sang
     [not found]                     ` <20090325104357.GB3029-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-03-28 21:36                       ` Guennadi Liakhovetski
     [not found]                         ` <Pine.LNX.4.64.0903282207480.9903-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-03-30  0:30                           ` Ben Dooks
     [not found]                             ` <20090330003012.GM19758-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-03-30  8:53                               ` Darius Augulis
2009-03-31 11:02                               ` Darius Augulis
     [not found]                                 ` <49D1F85C.8040703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-31 11:08                                   ` Wolfram Sang
2009-03-30  8:46                           ` Sascha Hauer
     [not found]                             ` <20090330084655.GO7861-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-03-30  9:23                               ` Guennadi Liakhovetski
2009-03-30  9:24                           ` Mark Brown
     [not found]                             ` <20090330092402.GA31781-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2009-03-30  9:37                               ` Guennadi Liakhovetski
     [not found]                                 ` <Pine.LNX.4.64.0903301128540.4455-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-03-30  9:07                                   ` Darius Augulis
2009-03-30  7:48                         ` Darius Augulis
     [not found]                           ` <d7f267fd0903300048p7caee6e0ne63916b986b132b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-30  9:26                             ` Guennadi Liakhovetski
     [not found]                               ` <Pine.LNX.4.64.0903301124040.4455-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-03-30  9:11                                 ` Darius Augulis
2009-03-30  9:51                                 ` Sascha Hauer
     [not found]                                   ` <20090330095147.GP7861-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-03-30  9:58                                     ` Guennadi Liakhovetski
     [not found]                                       ` <Pine.LNX.4.64.0903301156060.4455-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-03-30  9:03                                         ` Darius Augulis [this message]
     [not found]                                           ` <49D08AE4.1090102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-30 13:50                                             ` Guennadi Liakhovetski
     [not found]                                               ` <Pine.LNX.4.64.0903301548570.4455-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-03-30 14:54                                                 ` [PATCH] imx/i2c: Make disable_delay a per-device variable Wolfram Sang
     [not found]                                                   ` <20090330145409.GD3058-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-04-02  8:40                                                     ` Guennadi Liakhovetski
2009-04-02 11:03                                                     ` Darius Augulis
2009-03-31  2:54                                                 ` [PATCH 1/5] I2C driver for MXC Richard Zhao
     [not found]                                                   ` <4e090d470903301954h2b3174b5n4b6c41b02cf7b62c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-31 11:48                                                     ` Darius Augulis
2009-04-01 23:06                                                 ` Guennadi Liakhovetski
     [not found]                                                   ` <Pine.LNX.4.64.0904020105300.5389-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-04-02  6:32                                                     ` Darius Augulis
2009-04-01 11:57 ` Holger Schurig
     [not found]   ` <200904011357.03226.hs4233-x6+DxXLjN1AJvtFkdXX2Hg4jNU5vUVPG@public.gmane.org>
2009-04-02  6:32     ` Darius Augulis
2009-04-01 11:58 ` Holger Schurig
     [not found]   ` <200904011358.21191.hs4233-x6+DxXLjN1AJvtFkdXX2Hg4jNU5vUVPG@public.gmane.org>
2009-04-03 12:35     ` Sascha Hauer

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=49D08AE4.1090102@gmail.com \
    --to=augulis.darius-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=g.liakhovetski-Mmb7MZpHnFY@public.gmane.org \
    --cc=linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.