From patchwork Tue Oct 23 08:35:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12429 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AEB7923FB6 for ; Tue, 23 Oct 2012 08:36:28 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5DD3AA18534 for ; Tue, 23 Oct 2012 08:36:28 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so4737652iej.11 for ; Tue, 23 Oct 2012 01:36:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=6zxSYcXpl1D/gqYk+3wTibGOCdBdPmfCOdGJxKtq8d4=; b=LOClfqVR33bX4fwg3jAp6ELXDC3VGYRL+M9V6M4gFL4v7I1PzNce1yknf0fNPspGKG Rj4vPjREe8KtkU22BfPpBkIuN1YtL6FIfRJ/6a+qx16S9RhVpwV+/unaHwWizjnVRuAc umE0WvYMcWfYvxMFdKTzkn11+bHFXCPlJ6zYZioEOKckI78Z9qw9jOp3gnuAzBLrklX0 xH55H0gl8iwMzKZeEtu/AHQdY0CEQFq/MpSQGb4stKzi6/bFslYuJ80DEu3WUP8EH8/v JzA85c5m6pxxOSTgxMBhya3+xkfiuWFotyNCcjgtChPa4+UA3PHCfKE5ceeQUvlESJr9 WVUw== Received: by 10.50.140.97 with SMTP id rf1mr17337573igb.70.1350981387749; Tue, 23 Oct 2012 01:36:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp385472igt; Tue, 23 Oct 2012 01:36:27 -0700 (PDT) Received: by 10.14.179.69 with SMTP id g45mr5999040eem.42.1350981386501; Tue, 23 Oct 2012 01:36:26 -0700 (PDT) Received: from eu1sys200aog111.obsmtp.com (eu1sys200aog111.obsmtp.com [207.126.144.131]) by mx.google.com with SMTP id w8si1387650eeo.8.2012.10.23.01.36.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Oct 2012 01:36:26 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.131; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKUIZXAz9xb4MOd8tfYySp1cICI/TKE6P8@postini.com; Tue, 23 Oct 2012 08:36:26 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 4066144; Tue, 23 Oct 2012 08:35:11 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 0075358; Tue, 23 Oct 2012 04:04:34 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 7D87724C07C; Tue, 23 Oct 2012 10:35:37 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 23 Oct 2012 10:35:41 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , Lee Jones Subject: [PATCH v2] pinctrl/nomadik: use irq_create_mapping() Date: Tue, 23 Oct 2012 10:35:39 +0200 Message-ID: <1350981339-13316-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlappWMhEgx466UXfl8lif3kHFiYrO+ql82VT2/4/VWRaNXbVcCPSyKO9WHhWVYhpeQsJA4 From: Linus Walleij Since in the DT case, the linear domain path will not allocate descriptors for the IRQs, we need to use irq_create_mapping() for mapping hwirqs to Linux IRQs, so these descriptors get created on-the-fly in this case. ChangeLog v1->v2: - Just use irq_create_mapping() in the .to_irq function since this is called before unmasking or enabling any interrupt lines, so irq_find_mapping() should be sufficient for the IRQ handler function. Cc: Lee Jones Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 01aea1c..db5e0b3 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -1056,7 +1056,7 @@ static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset) struct nmk_gpio_chip *nmk_chip = container_of(chip, struct nmk_gpio_chip, chip); - return irq_find_mapping(nmk_chip->domain, offset); + return irq_create_mapping(nmk_chip->domain, offset); } #ifdef CONFIG_DEBUG_FS