Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6817107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:00:31+00:00 2026-05-26T21:00:31+00:00

I posted this is the thread which discussed about request_threaded_irq but I did not

  • 0

I posted this is the thread which discussed about request_threaded_irq but I did not get any reply. So I am posting it freshly.

I am working on a touchscreen driver for capacitive touchscree. It used request_threaded_irq() call instead of request_irq(). I could not understand the basic difference betweeen two. It says :-

Name

request_threaded_irq — allocate an interrupt line

Synopsis

int request_threaded_irq (unsigned int irq, irq_handler_t handler,irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id);

Arguments

  1. irq – Interrupt line to allocate
  2. handler – Function to be called when the IRQ occurs. Primary handler for threaded interrupts If NULL and thread_fn != NULL the default primary handler is installed
  3. thread_fn – Function called from the irq handler thread If NULL, no irq thread is created
  4. irqflags – Interrupt type flags
  5. devname – An ascii name for the claiming device
  6. dev_id – A cookie passed back to the handler function

the Handler and Thread_fn arguments are the ones which are confusing. Also there is no work function defined in the driver.

Here is the driver which I am refering to.

Can somebody help me in understanding this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:00:31+00:00Added an answer on May 26, 2026 at 9:00 pm

    The request_threaded_irq() function was added to allow developers to split interrupt handling code into two parts. One part that will execute with interrupts blocked, and a second part that can be done by a kernel thread without interrupts blocked. For details of why, you can read this:

    http://lwn.net/Articles/302043/

    In your case, the driver you linked to does this:

    err = request_threaded_irq(client->irq, NULL, cy8ctmg110_irq_thread,
                               IRQF_TRIGGER_RISING, "touch_reset_key", ts);
    

    By passing NULL for the second arg, “handler”, the argument to thread_fn, or the function cy8ctmg110_irq_thread() will be called when the interrupt is detected.

    For you, choosing which request irq function will depend on what your driver needs to do in interrupt context.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I posted this question on Reddit Programming and did not get a single response.
I posted this very same item on SERVERFAULT, but got no reply. So here
I've posted this on django-users but haven't received a reply! So I have my
I had posted this earlier on Stack Overflow, but couldn't get a positive result.
I posted this on GAE for Java group, but I hope to get some
As I've posted on this thread I need keep synchronized an SQL Server (not
I'm using the FontFitTextView that was posted in this other thread , but it
I posted this question yesterday evening, which has led me to discover a huge
LearnWPF.com posted this article about converting bitmap images to XAML and using them in
I've posted this here , but thought it might deserve a question on its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.