lkml.org 
[lkml]   [2011]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH v5 3/4] drivers/i2c/busses/i2c-at91.c: add new driver
Hi Carsten,

Carsten Behling wrote on 2011-11-23:
> I think it must be:
>
> + for (i = 0; i < msg->len; ++i) {
> + internal_address |= ((unsigned)msg->buf[msg->len-1-i]) << (8 * i);
> + int_addr_flag += AT91_TWI_IADRSZ_1;
> + }
> + at91_twi_write(dev, AT91_TWI_IADR, internal_address);

yes, I think you're right. I tested only with 8 bit addresses
(msg->len = 1), so I haven't seen this error.

I will modify the patch and post it later today.

Thanks for this feedback,
Niko



\
 
 \ /
  Last update: 2011-11-23 15:37    [W:0.042 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site