Dirk Behme <[EMAIL PROTECTED]> writes:

> Kevin Hilman wrote:
>> Dirk Behme <[EMAIL PROTECTED]> writes:
>>
>>
>>>Remove I2C zero length transfer "HACK" and do real zero length
>>>transfers. This fixes Oops at kernel startup while "scanning" for
>>>TLV320AIC23IDx addresses.
>>>
>>
>> Dirk,
>>
>> I reworked this slightly, but hopefully didn't change any
>> functionality.
>>
>> Rather than undo the DAVINCI_HACK stuff and add your fixups in the
>> same patch, I'd rather see separate commits for removal of the hack,
>> and your fixups.
>>
>> So, what I did in a temporary branch[1] is do a 'git revert' of the
>> original commit which added the DAVINCI_HACK[2], thus undoing the
>> hack, then applying your patch.  Note that most of your patch failed
>> to apply because of the revert, so I just blindly applied the patch,
>> and ignored the failures.  Can you sanity check my branch and make
>> sure I didn't miss any of your fixups?  If it looks OK to you, I'll
>> merge that branch with the master branch.
>>
>> Kevin
>>
>>
>> [1] see branch 'khilman/temp/dirk-i2c'  Also visible via the gitweb
>>     interface under the 'heads' section at the bottom of the summary page.
>> [2] by running 'git-revert a8e67c9d0e13a774d19e594f43ff7a29993782c4'
>
> I compared
>
> http://source.mvista.com/git/?p=linux-davinci-2.6.git;a=blob;f=drivers/i2c/busses/i2c-davinci.c;h=485a9a1f5801525ff1800f0e92b85791a37ffd3e;hb=2a681dfdfec2160d473c2b09ba37a816bc840f65
>
> with my local version of i2c-davinci.c after locally applying the
> patch and get diff in attachment. Do you kindly like to check?
>
> Many thanks
>
> Dirk
>
> --- ./drivers/i2c/busses/i2c-davinci.c_after_merge    2008-04-02 
> 19:49:15.000000000 +0200
> +++ ./drivers/i2c/busses/i2c-davinci.c        2008-04-02 19:48:55.000000000 
> +0200
> @@ -246,9 +246,6 @@ i2c_davinci_xfer_msg(struct i2c_adapter 
>       u16 w;
>       int r;
>  
> -     if (msg->len == 0)
> -             return -EINVAL;
> -
>       if (!pdata)
>               pdata = &davinci_i2c_platform_data_default;
>       /* Introduce a delay, required for some boards (e.g Davinci EVM) */
> @@ -260,6 +257,7 @@ i2c_davinci_xfer_msg(struct i2c_adapter 
>  
>       dev->buf = msg->buf;
>       dev->buf_len = msg->len;
> +     dev->stop = stop;
>  
>       davinci_i2c_write_reg(dev, DAVINCI_I2C_CNT_REG, dev->buf_len);
>  
> @@ -373,7 +371,7 @@ i2c_davinci_xfer(struct i2c_adapter *ada
>  
>  static u32 i2c_davinci_func(struct i2c_adapter *adap)
>  {
> -     return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);
> +     return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
>  }
>  
>  static inline void terminate_read(struct davinci_i2c_dev *dev)


OK, I've included this diff, and pushed my temp branch.

I did a quick cat foo.wav > /dev/dsp test and things seem ok.

Kevin
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to