LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-08-2008, 04:17 AM   #1
westermani
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
i2c block read problemsss


Hi,

i hope someone can help me...here is my trouble

i'm using i2c from user space on an ARM of atmel. I can read and write byte with the SMBus functions but when i try to read blocks this error apear

i2c_adapter i2c-0: Block read not supported under i2c emulation!!

the function is
ret = i2c_smbus_read_block_data(fd, 0x00, buff);

what can i do?? i use i2c_smbus_write_block_data and it works and when i use write(fd, buff, 8) it works to but when i try the read operation it fails...

thank you very much for helping me and sorry of my bad english, i'm trying to learn it.


westermani
 
Old 05-08-2008, 04:27 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
the problemsss isss block readssss... the sssolussshion isss deathhhhh...

Code:
case I2C_SMBUS_BLOCK_DATA:
		if (read_write == I2C_SMBUS_READ) {
			printk("i2c-core.o: Block read not supported under "
			       "I2C emulation!\n");
		return -1;
You need to stop using i2c emulation if you want to use block reads.
Perhaps you are doing this in , um, userspace?
http://xgoat.com/wp/2007/11/11/using...pace-in-linux/
 
Old 05-08-2008, 05:01 AM   #3
westermani
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
stop the emulation??

sorry, i don't understand you

yes, i'm using this from userspace, but how can i stop the emulation??maybe i need other functions to handle the i2c bus??or i have to change the driver definition??
 
Old 05-08-2008, 06:12 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
The link I provided has a howto for using i2c from userspace.
 
Old 05-08-2008, 09:13 AM   #5
westermani
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
yes, i now and i have seen it, but now my problem is that linux doesn't support read block and i need it. what can i do to change it??i have to recompile the i2c adapter or can i change it by the ioctl function??

thank you for your patient...

regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 06:21 AM
code to read block from the file suchi_s Programming 5 09-08-2004 07:21 AM
reiserfsck and cannot read block solex Linux - General 6 09-03-2004 06:52 PM
Why The block driver I wrote can't read? freasy Programming 2 07-17-2004 07:50 AM
how to format a HD that has the block 0 impossible to read ? ordx Linux - Hardware 2 12-10-2003 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration