public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* uses of irq_to_gpio() in drivers/staging/iio
@ 2011-08-02 16:43 Ben Dooks
  2011-08-02 17:03 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2011-08-02 16:43 UTC (permalink / raw)
  To: linux-iio, jic23, LKML

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-02 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02 16:43 uses of irq_to_gpio() in drivers/staging/iio Ben Dooks
2011-08-02 17:03 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox