public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <bjdooks@googlemail.com>
To: linux-iio@vger.kernel.org, jic23@cam.ac.uk,
	LKML <linux-kernel@vger.kernel.org>
Subject: uses of irq_to_gpio() in drivers/staging/iio
Date: Tue, 02 Aug 2011 17:43:16 +0100	[thread overview]
Message-ID: <4E382924.2050201@googlemail.com> (raw)

Whilst looking in drivers/staging/iio/accel/lis3l02dq_core.c, I
came across the following lines of code

    708          if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) {
    709                  ret = request_threaded_irq(st->us->irq,
    710                                             &lis3l02dq_th,
    711 
&lis3l02dq_event_handler,
    712                                             IRQF_TRIGGER_RISING,
    713                                             "lis3l02dq",
    714                                             indio_dev);

Which gives rise to the following questions:

1) IRQ0 and GPIO0 are often valid numbers for GPIOs.

2) Not all interrupts are necessarily GPIO interrupts. What happens
    if the device is attached to a hardware interrupt line which is
    not a GPIO?

-- 
Ben Dooks <bjdooks@googlemail.com> http://www.fluff.org/ben/

             reply	other threads:[~2011-08-02 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 16:43 Ben Dooks [this message]
2011-08-02 17:03 ` uses of irq_to_gpio() in drivers/staging/iio Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E382924.2050201@googlemail.com \
    --to=bjdooks@googlemail.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox