LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-07-2011, 06:46 AM   #1
Mike Davies
Member
 
Registered: Jul 2004
Distribution: Custom Linux, Buildroot, Busybox, Fedora, Raspberry Pi
Posts: 144

Rep: Reputation: 15
i2c bus crashes ?


I'm running linux 2.6.34.7 with the i2c-parport-lite driver.

I have two chips on the same i2c bus with different addresses.

I have two programs, program A talks to one chip and program B talks to the other.

If I run each program on it's own then everything is fine. If I run both programs together then occasionally one of the programs will return rubbish and/or error codes.

Both programs open /dev/i2c-0 read/write. No errors returned at this point, so I somehow assumed that the driver would or could handle multiple requests on the same bus for different chips, holding off one read/write request if anything was in progress. This doesn't seem to happen.

Should the driver hold off one request if another is in progress ? Or is there some option I've overlooked somewhere to implement this ?
 
Old 07-23-2011, 09:22 AM   #2
Mike Davies
Member
 
Registered: Jul 2004
Distribution: Custom Linux, Buildroot, Busybox, Fedora, Raspberry Pi
Posts: 144

Original Poster
Rep: Reputation: 15
No-one knows I guess.

probably overkill but I've now implemented my own front end to the driver using semaphores to make sure only one i/o request is current at a time.
 
  


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 Switch / bus interlocking mincher Linux - Embedded & Single-board computer 0 12-02-2009 10:19 AM
Could not set I2C Bus Busy bit to zero mist_4u Linux - Newbie 2 10-15-2009 12:00 AM
How to identify files in /sys/bus/i2c/devices/ koyi Linux - Hardware 0 07-18-2005 01:55 AM
torsmo error scandir for /sys/bus/i2c/devices/: No such file or directory KaZiber Linux - General 2 04-17-2005 02:41 AM
Unable to find i2c bus information ? OneManArmy Debian 1 05-16-2004 07:25 PM

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

All times are GMT -5. The time now is 03:57 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
Open Source Consulting | Domain Registration