From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory Fong Subject: Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains Date: Tue, 3 Oct 2017 20:03:12 -0700 Message-ID: References: <20170930034057.15166-1-opendmb@gmail.com> <20170930034057.15166-7-opendmb@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-wr0-f194.google.com ([209.85.128.194]:33896 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797AbdJDDDo (ORCPT ); Tue, 3 Oct 2017 23:03:44 -0400 In-Reply-To: <20170930034057.15166-7-opendmb@gmail.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Doug Berger Cc: Linus Walleij , Brian Norris , Florian Fainelli , bcm-kernel-feedback-list , linux-gpio@vger.kernel.org, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The GPIOLIB IRQ chip helpers were very appealing, but badly broke > the 1:1 mapping between a GPIO controller's device_node and its > interrupt domain. Out of curiosity, what sort of problems have you seen from this? > > This commit consolidates the per bank irq domains to a version > where we have one larger interrupt domain per GPIO controller > instance spanning multiple GPIO banks. This works (and is reminiscent to my initially submitted implementation at [1]), but I think it might make sense to keep as-is (using the gpiolib irqchip helpers), and instead allocate an irqchip fwnode per bank and use to_of_node() to set it as the of_node for the gpiochip before calling gpiochip_irqchip_add(). OTOH, that capability might go away... Linus, can you comment on the FIXME in gpiochip_irqchip_add_key() that says "get rid of this and use gpiochip->parent->of_node everywhere"? It seems like it would still be beneficial to be able to override the associated node for a gpiochip, since that's what's used for the irqdomain, but if that's going away, obviously we don't want to start using that now. Thanks, Gregory [1] https://patchwork.kernel.org/patch/6347811/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751177AbdJDDDq (ORCPT ); Tue, 3 Oct 2017 23:03:46 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33896 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797AbdJDDDo (ORCPT ); Tue, 3 Oct 2017 23:03:44 -0400 X-Google-Smtp-Source: AOwi7QAnSOuYb5ZyiW1LUYN3xsBJDMACAgZ2LmcWNkQ7WJdCGU/aohysllRakmB8M7hBcSUKQRuqWZjschVH8T0I7qU= MIME-Version: 1.0 In-Reply-To: <20170930034057.15166-7-opendmb@gmail.com> References: <20170930034057.15166-1-opendmb@gmail.com> <20170930034057.15166-7-opendmb@gmail.com> From: Gregory Fong Date: Tue, 3 Oct 2017 20:03:12 -0700 Message-ID: Subject: Re: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains To: Doug Berger Cc: Linus Walleij , Brian Norris , Florian Fainelli , bcm-kernel-feedback-list , linux-gpio@vger.kernel.org, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The GPIOLIB IRQ chip helpers were very appealing, but badly broke > the 1:1 mapping between a GPIO controller's device_node and its > interrupt domain. Out of curiosity, what sort of problems have you seen from this? > > This commit consolidates the per bank irq domains to a version > where we have one larger interrupt domain per GPIO controller > instance spanning multiple GPIO banks. This works (and is reminiscent to my initially submitted implementation at [1]), but I think it might make sense to keep as-is (using the gpiolib irqchip helpers), and instead allocate an irqchip fwnode per bank and use to_of_node() to set it as the of_node for the gpiochip before calling gpiochip_irqchip_add(). OTOH, that capability might go away... Linus, can you comment on the FIXME in gpiochip_irqchip_add_key() that says "get rid of this and use gpiochip->parent->of_node everywhere"? It seems like it would still be beneficial to be able to override the associated node for a gpiochip, since that's what's used for the irqdomain, but if that's going away, obviously we don't want to start using that now. Thanks, Gregory [1] https://patchwork.kernel.org/patch/6347811/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregory.0xf0@gmail.com (Gregory Fong) Date: Tue, 3 Oct 2017 20:03:12 -0700 Subject: [PATCH 6/7] gpio: brcmstb: consolidate interrupt domains In-Reply-To: <20170930034057.15166-7-opendmb@gmail.com> References: <20170930034057.15166-1-opendmb@gmail.com> <20170930034057.15166-7-opendmb@gmail.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Doug, On Fri, Sep 29, 2017 at 8:40 PM, Doug Berger wrote: > The GPIOLIB IRQ chip helpers were very appealing, but badly broke > the 1:1 mapping between a GPIO controller's device_node and its > interrupt domain. Out of curiosity, what sort of problems have you seen from this? > > This commit consolidates the per bank irq domains to a version > where we have one larger interrupt domain per GPIO controller > instance spanning multiple GPIO banks. This works (and is reminiscent to my initially submitted implementation at [1]), but I think it might make sense to keep as-is (using the gpiolib irqchip helpers), and instead allocate an irqchip fwnode per bank and use to_of_node() to set it as the of_node for the gpiochip before calling gpiochip_irqchip_add(). OTOH, that capability might go away... Linus, can you comment on the FIXME in gpiochip_irqchip_add_key() that says "get rid of this and use gpiochip->parent->of_node everywhere"? It seems like it would still be beneficial to be able to override the associated node for a gpiochip, since that's what's used for the irqdomain, but if that's going away, obviously we don't want to start using that now. Thanks, Gregory [1] https://patchwork.kernel.org/patch/6347811/