From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753268AbdF2OQ6 (ORCPT ); Thu, 29 Jun 2017 10:16:58 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:37271 "EHLO mail-it0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbdF2OQx (ORCPT ); Thu, 29 Jun 2017 10:16:53 -0400 MIME-Version: 1.0 In-Reply-To: <657221fa-c6b3-e914-1a81-9a48972ee6d5@ti.com> References: <1497543642.3086.35.camel@baylibre.com> <1497954416.7387.1.camel@baylibre.com> <1497979438.7387.10.camel@baylibre.com> <1498141515.7387.16.camel@baylibre.com> <0e12f9bd-4e0b-c602-5627-5dbda5371dee@ti.com> <1498587929.25567.12.camel@baylibre.com> <657221fa-c6b3-e914-1a81-9a48972ee6d5@ti.com> From: Linus Walleij Date: Thu, 29 Jun 2017 16:16:51 +0200 Message-ID: Subject: Re: [RFC] gpio: about the need to manage irq mapping dynamically. To: Grygorii Strashko Cc: Jerome Brunet , "linux-gpio@vger.kernel.org" , Marc Zyngier , "open list:ARM/Amlogic Meson..." , Kevin Hilman , Linux Kernel 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 Tue, Jun 27, 2017 at 10:43 PM, Grygorii Strashko wrote: > And my opinion is still the same here - It should be perfectly valid to create > mappings from gpio_to_irq() to handle properly orthogonality of gpiochip and > gpio-irqchip functionality and satisfy SPARSE_IRQ goal (allocate Linux virq and > irq descriptors on demand). You are right. I would rather say: GPIO drivers that have a 1-to-1 mapping between GPIO lines and IRQs should not do it, they should map up them all at probe(). Drivers that actually have fewer IRQs than GPIO lines should be able to create the mappings in gpio_to_irq(). Yours, Linus Walleij