LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-20-2009, 02:59 PM   #1
cocosnut
LQ Newbie
 
Registered: May 2009
Posts: 4

Rep: Reputation: 0
programming I2C


Hello
I have a problem with a debian linux with kernel 2.4.32 and I2C-bus. The modules i2c-core and i2c-dev are loaded in the kernel (i2c core version 2.6.1) and the adapter is ready (PCA9564 ISA adapter). With the command cat /proc/bus/i2c can i test it. But in the file /proc/bus/i2c-0 is only the information "invalid argument". Why? How can i load it correctly? This is the reason because i have a break with the return message in the following part of code (invalid argument):

Code:
if(ioctl(fd, I2C_SLAVE, ADDR) < 0) {fprintf(stderr, "error: %m\n", fd);}
thanks
 
Old 05-22-2009, 01:34 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
install the lm-sensors package, and run 'sensors-detect' as root. Follow the onscreen instructions.
 
  


Reply



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
i2c: What is it doing for me? HaroldWho Slackware 3 10-05-2007 02:43 PM
Help! Problems with i2c-dev. No more /dev/i2c-* em1l Fedora 0 10-28-2005 05:48 AM
What am I do do? What am I2C? Titan2k SUSE / openSUSE 2 07-12-2005 07:15 PM
i2c wilu Linux - Newbie 0 01-09-2005 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:50 AM.

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
Open Source Consulting | Domain Registration