Return-path: Received: from mail-oa0-f47.google.com ([209.85.219.47]:64738 "EHLO mail-oa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752123AbaE0OLK (ORCPT ); Tue, 27 May 2014 10:11:10 -0400 Received: by mail-oa0-f47.google.com with SMTP id i7so9641211oag.6 for ; Tue, 27 May 2014 07:11:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1401090486-4414-2-git-send-email-hdegoede@redhat.com> References: <1401090486-4414-1-git-send-email-hdegoede@redhat.com> <1401090486-4414-2-git-send-email-hdegoede@redhat.com> Date: Tue, 27 May 2014 16:11:09 +0200 Message-ID: (sfid-20140527_161115_678163_2CC7D7C3) Subject: Re: [PATCH 01/11] pinctrl: sunxi: create irq/pin mapping during init From: Linus Walleij To: Hans de Goede Cc: Chris Ball , Ulf Hansson , Arend van Spriel , "John W. Linville" , Maxime Ripard , Chen-Yu Tsai , "linux-arm-kernel@lists.infradead.org" , "linux-mmc@vger.kernel.org" , linux-wireless , devicetree , linux-sunxi Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, May 26, 2014 at 9:47 AM, Hans de Goede wrote: > From: Chen-Yu Tsai > > The irq/pin mapping is used to lookup the pin to mux to the irq > function when the irq is enabled. It is created when gpio_to_irq > is called. Creating the mapping during init allows us to map the > interrupts directly from the device tree. > > Signed-off-by: Chen-Yu Tsai > Signed-off-by: Hans de Goede This is exactly correct. Patch applied. I tried to hack the sunxi driver to even use the gpiolib irqchip helpers but exactly this complex map thing in ->irq_array[] git me stuck. If any of you guys could be so nice to take a stab at this (compare to other commits converting drivers to use gpiolibs irqchip helpers) then I'd be very happy. Yours, Linus Walleij