From patchwork Mon Jan 7 14:23:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13885 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 0071223E27 for ; Mon, 7 Jan 2013 14:24:15 +0000 (UTC) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by fiordland.canonical.com (Postfix) with ESMTP id 98CE5A186B6 for ; Mon, 7 Jan 2013 14:24:14 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id n11so19284002vch.16 for ; Mon, 07 Jan 2013 06:24:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=kbw5HI+c8h3SEzFAbDJP3lPH+ZQ8h9OQRbXYcjrUNQc=; b=ZgNmEYBiCHYXJpgx12g8Ie2S3BsxarC401adUMOWHnKQdMwY+IDZrsHb/bPpjSiDh5 DSD2/v8idbGmpIOaXq4g4CIeFEwsSCUbglrKoWxJ/rqamT/E1/PO/e1Kj1JQ8OmE8FlK 1sfJaSL1BFq+rXOl9wy3sveDPMkHXN1zpW3MjmAQuboHKsnQVgBff23QThINkugqDC8R pXWDbXd1TjPnpTe20tfacvZw93v+8/FLRaVvIC7XGWcjrplqW0KOyaOQo4bFrGqDbMKC 0duXdsMvop8LkukQxNCT9nvBy651E+EntRC78FSK225tcHUfVEx0yspgde2Z2IZjT8RS fhwQ== X-Received: by 10.58.210.65 with SMTP id ms1mr83830910vec.59.1357568654121; Mon, 07 Jan 2013 06:24:14 -0800 (PST) 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.58.145.101 with SMTP id st5csp63272veb; Mon, 7 Jan 2013 06:24:13 -0800 (PST) X-Received: by 10.14.213.134 with SMTP id a6mr165735930eep.45.1357568652789; Mon, 07 Jan 2013 06:24:12 -0800 (PST) Received: from eu1sys200aog108.obsmtp.com (eu1sys200aog108.obsmtp.com [207.126.144.125]) by mx.google.com with SMTP id j49si157125098eep.141.2013.01.07.06.24.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 06:24:12 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.125 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.125; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.125 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-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUOrag93ZDiSoBL78iKFmiEgymuzojYB8@postini.com; Mon, 07 Jan 2013 14:24:12 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 445AE121; Mon, 7 Jan 2013 14:24:01 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8BDA148B5; Mon, 7 Jan 2013 14:24:00 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 1362F24C2F0; Mon, 7 Jan 2013 15:23:53 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 7 Jan 2013 15:23:59 +0100 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij Subject: [PATCH 2/2] pinctrl/nomadik: make independent of Date: Mon, 7 Jan 2013 15:23:57 +0100 Message-ID: <1357568637-6054-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: ALoCoQms9s9LD5xRYTdfV/sIX3Ly40tAx/A+D9PUfc+309L3cpumga1ONTnPo4Sj0fGg7y5ucwSF From: Linus Walleij Some leftovers in the driver were using NOMADIK_* macros to translate the irq numbers to offsets, while the first base IRQ was already being passed from platform data, and the function setting the disable mask could just as well use the irqdomain. Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 66cce5f..f1e5ba2 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "pinctrl-nomadik.h" #include "core.h" @@ -218,7 +217,7 @@ nmk_gpio_disable_lazy_irq(struct nmk_gpio_chip *nmk_chip, unsigned offset) u32 falling = nmk_chip->fimsc & BIT(offset); u32 rising = nmk_chip->rimsc & BIT(offset); int gpio = nmk_chip->chip.base + offset; - int irq = NOMADIK_GPIO_TO_IRQ(gpio); + int irq = irq_find_mapping(nmk_chip->domain, offset); struct irq_data *d = irq_get_irq_data(irq); if (!rising && !falling) @@ -1416,7 +1415,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) platform_set_drvdata(dev, nmk_chip); if (!np) - irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); + irq_start = pdata->first_irq; nmk_chip->domain = irq_domain_add_simple(np, NMK_GPIO_PER_CHIP, irq_start, &nmk_gpio_irq_simple_ops, nmk_chip);