linux 2.6.12 at91_i2c problems

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Mike Crowe
Contact:
Location: Long Beach, MS
Posts: 7
Joined: Tue Mar 08, 2005 8:49 pm

linux 2.6.12 at91_i2c problems

Thu Apr 21, 2005 10:46 pm

Hello (again)
I'm working with the i2c driver from the http://maxim.org.za/AT91RM9200/2.6/ patch. I've got it compiled and loading on a CSB337, but thats about as far as it goes. I turned on i2c debugging and got a few messages when trying to probe for the ds1337
when I modprobe the at91rm9200 I get the following log activity
Apr 21 20:43:00 atdemo kernel: i2c_adapter i2c-0: adapter unregistered
Apr 21 20:43:08 atdemo kernel: i2c_adapter i2c-0: found normal i2c entry for adapter 0, addr 68
Apr 21 20:43:08 atdemo kernel: i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=0
Apr 21 20:43:08 atdemo kernel: i2c:at91_xfer doing write 0 bytes to 0x00 - 1 messages
Apr 21 20:43:08 atdemo kernel: i2c:at91_xfer transfer complete
Apr 21 20:43:08 atdemo kernel: i2c_adapter i2c-0: registered as adapter #0

I don't see any bus activity with a scope probe. It doesn't appear that a probe actually takes place. Ideas?
Thanks
Wow Linux runs on that little thing?!
bruce vicknair
Contact:
Location: tomball, tx
Posts: 60
Joined: Wed Jan 26, 2005 3:24 am

Fri Jul 29, 2005 9:11 pm

i used the same patch, disabled the at91rm9200 rtc, enabled i2c ds1337 and all debug msg levels :
part of dmesg---->
i2c /dev entries driver
i2c-core: driver dev_driver registered.
i2c_adapter i2c-0: Registered as minor 0
i2c_adapter i2c-0: registered as adapter #0
Found AT91 i2c
i2c-core: driver ds1337 registered.
i2c_adapter i2c-0: found normal i2c entry for adapter 0, addr 68
i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[1] R, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[1] R, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[1] R, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[1] R, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[0] W, addr=0x68, len=1
i2c_adapter i2c-0: master_xfer[1] R, addr=0x68, len=1

so it seems to have found the part(i use ds1338), can you tell me how you were going to read the string?

i'm not to sure if to use read or ioctrl?

so far i have-------
fd_i2c=open("/dev/i2c/0", O_RDWR);
if (fd_i2c == -1) {
printf("can't open i2c.\n");
exit(0);
}
passes...
I verified the twd and twck with a scope and looks correct.
bruce

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 1 guest