LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-07-2013, 05:33 AM   #1
smith283
Member
 
Registered: Aug 2012
Posts: 39

Rep: Reputation: Disabled
Interrupts on parallel port.


Hey mate,
I need help regarding interrupts on the parallel port:-

1.) implementing interrupt handler...

2.) registering the interrupt handler...(removing the existing parallel port driver and replacing the existing parallel port handler with mine)

3.) invoking the interrupt...(through setting status nack bit..).

thnx
reply fast...
 
Old 01-08-2013, 02:13 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
It's time to "re-align your thinking."

Your piece of software ... whatever it is ... is not the only bit of software (on this planet...) that "is interested in the fact that an interrupt has just occurred on this parallel I/O port ..."

... it is, rather, 'just 'an interested party.'" Just one of however-many...

Your driver, therefore, is obliged to register itself upon the appropriate interrupt-handling chain, in order to be duly called by the Linux kernel whenever such an interrupt arrives. It will be obliged to indicate to the kernel whether it has "handled" the interrupt, or not. But, in any case, it will not be "in control of" the situation.

It may well be that part of the process of "handling the interrupt" consists of a hardware action, such as "setting a status-bit." It may well be that, in your suitably-specialized hardware situation, "no other interrupt-handler need apply." Your second-level interrupt handler actually has that prerogative.

Last edited by sundialsvcs; 01-08-2013 at 02:15 PM.
 
Old 01-10-2013, 04:11 AM   #3
smith283
Member
 
Registered: Aug 2012
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thnx for the reply sir

I tried to register the interrupt handler with a call "request_irq()" at irq line-7. But when i insert the module i get an error "IRQ handler type mismatch for IRQ 7
" as the irq line-7 is already acquired by parport0.
And also i can see from the "/proc/interrupts" that parport0 is registered to IRQ 7. So, my problem is how can i register my handler to the IRQ 7.
Or is there any way that my handler can share the IRQ 7 with existing parpot0??

Thnx, waiting for reply
 
Old 01-10-2013, 04:31 AM   #4
smith283
Member
 
Registered: Aug 2012
Posts: 39

Original Poster
Rep: Reputation: Disabled
Actually, i hv written request_irq() call in the open() function of my driver and when i try to run the application(where open() and write() calls are called from application), i get this error"IRQ handler type mismatch for IRQ 7"..
 
  


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
C++ RS232/serial port - problem with signals or interrupts muzic Programming 14 08-12-2008 01:56 AM
serial port interrupts in user space pierre-luc Programming 2 04-24-2007 09:48 PM
Parallel Port & Serial Port device identification helpmeforlinux Linux - Hardware 3 01-02-2007 01:15 AM
parallel port mehro Linux - Hardware 5 01-31-2006 06:43 AM
Parallel Port CD-RW dbrook42 Linux - Hardware 3 09-30-2003 07:54 PM

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

All times are GMT -5. The time now is 10:34 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