Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374112

Re: [PATCH v2 2/9] drivers: irqchip: Add STM32 external interrupts support

Path csiph.com!news.mixmin.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!news.panservice.it!bofh.it!news.nic.it!robomod
From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/9] drivers: irqchip: Add STM32 external interrupts support
Date Fri, 08 Apr 2016 11:50:04 +0200
Message-ID <rlBda-1LF-49@gated-at.bofh.it> (permalink)
References <riMoq-6WJ-11@gated-at.bofh.it> <riMy6-71p-7@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=wYRmEALIACScsdNoZx/faC4clY7UX1GFD5jb8tYCwKI=; b=IVS8+po1nqSk+V0M/c2dMBbW2GU7aRggzSfJEyy4FaSSFs+4dlCOjFnrKgg4klxljQ IYNHNeS4fE3Ga3m8U5fhFBkTAw/zCbf+T7rS/Di4/NFiatPmAqUxjGoxw8Gq1S9RLKL4 W1abnxrLnMdryydUHiH1FQqNLy/KZdVS0uXA0=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=wYRmEALIACScsdNoZx/faC4clY7UX1GFD5jb8tYCwKI=; b=Mwy7rFfaUjEiM0PCsNavXk/h4JSsZSj2mZoqf/1bVx/rI6psj8wHmOZTTV3zugu9Q2 Bb848XmN8pn4jQJACIdfVax4+U47dPLDDFlt6vfsHcMeMHWVSBRFzdlXZZPLH/gfdeBJ +sOVyBdQU3nX71OCAVbz5B6OhIyIMrcMhVSEe+R9qeykqPGqHvNhBB/X42nXx0WuhrbM tHj+qFosx0ZnK9ExPPUWKtDmkWRV/pm+P17nGHDe8zF5MUq5O3Xho2v/n/7afbPHfSK2 Or2m04ELX9lnWLk5p6oZEwpv1wQyJ3bvIbtNi3UW82ML3k3VcMWqlSq6NuHdoeleQLZq gecg==
X-Gm-Message-State AD7BkJKJo57swH2ZX95rY0KiX3nC7OL7aKEPLYDZfBoWL3pwynxTF8bVFdFgsvabd1hWmpT6/GIIZhoZTOdZSU/V
MIME-Version 1.0
X-Received by 10.202.180.137 with SMTP id d131mr3609104oif.135.1460108851810; Fri, 08 Apr 2016 02:47:31 -0700 (PDT)
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 27
Organization linux.* mail to news gateway
X-Original-Cc Thomas Gleixner <tglx@linutronix.de>, Jason Cooper <jason@lakedaemon.net>, Marc Zyngier <marc.zyngier@arm.com>, Mark Rutland <mark.rutland@arm.com>, Rob Herring <robh+dt@kernel.org>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, Daniel Thompson <daniel.thompson@linaro.org>, Bruno Herrera <bruherrera@gmail.com>, Lee Jones <lee.jones@linaro.org>
X-Original-Date Fri, 8 Apr 2016 11:47:31 +0200
X-Original-Message-ID <CACRpkdZKaVRMH2ucMh_7WLzZ8WhTSrwDghB_YqsBdacm2cLcpg@mail.gmail.com>
X-Original-References <1459436979-17275-1-git-send-email-mcoquelin.stm32@gmail.com> <1459436979-17275-3-git-send-email-mcoquelin.stm32@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1374112

Show key headers only | View raw


On Thu, Mar 31, 2016 at 5:09 PM, Maxime Coquelin
<mcoquelin.stm32@gmail.com> wrote:

> +       gc = domain->gc->gc[0];
> +       gc->reg_base                         = base;
> +       gc->chip_types->type               = IRQ_TYPE_EDGE_BOTH;
> +       gc->chip_types->chip.name          = gc->chip_types[0].chip.name;
> +       gc->chip_types->chip.irq_ack       = irq_gc_ack_set_bit;
> +       gc->chip_types->chip.irq_mask      = irq_gc_mask_clr_bit;
> +       gc->chip_types->chip.irq_unmask    = irq_gc_mask_set_bit;
> +       gc->chip_types->chip.irq_set_type  = stm32_irq_set_type;
> +       gc->chip_types->chip.irq_set_wake  = stm32_irq_set_wake;
> +       gc->chip_types->regs.ack           = EXTI_PR;
> +       gc->chip_types->regs.mask          = EXTI_IMR;
> +       gc->chip_types->handler            = handle_edge_irq;

If this is used by a GPIO chip (as happens in another part of
the series), you need to set up the .irq_request_resources()
and .irq_release_resources() to call gpiochip_lock_as_irq()
and gpiochip_unlock_as_irq().

As with the other comment on the GPIO patch, the separation
of concerns between irqchip and gpiochip is a bit artificial
here and breaks down somewhat.

Yours,
Linus Walleij

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/9] drivers: irqchip: Add STM32 external interrupts support Linus Walleij <linus.walleij@linaro.org> - 2016-04-08 11:50 +0200

csiph-web