From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758106AbcDHJrf (ORCPT ); Fri, 8 Apr 2016 05:47:35 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:34220 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753730AbcDHJrc (ORCPT ); Fri, 8 Apr 2016 05:47:32 -0400 MIME-Version: 1.0 In-Reply-To: <1459436979-17275-3-git-send-email-mcoquelin.stm32@gmail.com> References: <1459436979-17275-1-git-send-email-mcoquelin.stm32@gmail.com> <1459436979-17275-3-git-send-email-mcoquelin.stm32@gmail.com> Date: Fri, 8 Apr 2016 11:47:31 +0200 Message-ID: Subject: Re: [PATCH v2 2/9] drivers: irqchip: Add STM32 external interrupts support From: Linus Walleij To: Maxime Coquelin Cc: Thomas Gleixner , Jason Cooper , Marc Zyngier , Mark Rutland , Rob Herring , "linux-gpio@vger.kernel.org" , Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Daniel Thompson , Bruno Herrera , Lee Jones Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 31, 2016 at 5:09 PM, Maxime Coquelin 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