lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/3] GPIO support for BRCMSTB
From
On Wed, May 27, 2015 at 5:26 AM, Gregory Fong <gregory.0xf0@gmail.com> wrote:

> I've now actually attempted to use the gpiolib irqchip code. This
> driver can't directly use gpiochip_irqchip_add() because of the
> multiple gpiochip : one irqchip map. At first, I thought it might be
> possible to simply add a new argument (or break things into a helper
> function) to allow setting the associated IRQ domain, but then I can't
> use the generic map and unmap functions which expect the irq_domain
> host_data member to be struct gpiochip *, which makes no sense in this
> case. That puts me right back to implementing a special version of
> the map and unmap function.

I see.

I wonder if it is better to use one device per bank, and then set
IRQF_SHARED when you issue request_irq(), and have the
IRQ handler return IRQ_NONE if the IRQ comes from this
bank, or IRQ_HANDLED if it has handled an IRQ from its own
space.

This way multiple banks can share a single interrupt line.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2015-06-02 12:01    [W:0.141 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site