From patchwork Fri Oct 11 09:32:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20957 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 865BD2611D for ; Fri, 11 Oct 2013 09:32:37 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf15803179obc.11 for ; Fri, 11 Oct 2013 02:32:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=qwdKNjv40WAUSpEs1RJy9AnWh1riAGDFaiQ6cY1IhgI=; b=Tlwr1cetTwZgSU++t09rVyq3MOTRxZcVKWMNE9Eu4qBe0FukL64yP+Cbj5HxEC7W14 ukmzpomrDsucaCAj6k9ZxMh5kG0eR6ZrMuotvsEYyFrcRinW/eoSjDOdRN9YeZkQYWbQ pMEckx3K1OIg2GRNFCOTeSMdSo+63OZWFYERViLjCakEkEQRwSMfumBPVW6iYeHevGKO 9r76qFnME2EkLyuAbJQwRFLTL7Ce/C8E6tpcw0BK1d9FXMMdVcWUHiYGsNOujmsBetWB UVxrLAlH7+wxTWULeBdi9PW7DSjKQyWu092unCWgle70SCmhyA/13nKq94nfWilsGSMZ 6fNQ== X-Received: by 10.182.241.129 with SMTP id wi1mr5984783obc.10.1381483957179; Fri, 11 Oct 2013 02:32:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.87.36 with SMTP id u4ls1436733qez.56.gmail; Fri, 11 Oct 2013 02:32:37 -0700 (PDT) X-Received: by 10.52.164.16 with SMTP id ym16mr419131vdb.39.1381483957083; Fri, 11 Oct 2013 02:32:37 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id zw10si16344284vdb.44.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 02:32:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hu8so2627060vcb.3 for ; Fri, 11 Oct 2013 02:32:37 -0700 (PDT) X-Gm-Message-State: ALoCoQmbF96EYANTSe+DJ1g/bPxG8jT01wKk0MHSnnJSCYNvU3R6nOcGidkxK13D7NB5YM1haUO7 X-Received: by 10.52.64.143 with SMTP id o15mr17289239vds.16.1381483956928; Fri, 11 Oct 2013 02:32:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp23468vcz; Fri, 11 Oct 2013 02:32:36 -0700 (PDT) X-Received: by 10.181.12.75 with SMTP id eo11mr2443394wid.24.1381483955876; Fri, 11 Oct 2013 02:32:35 -0700 (PDT) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mx.google.com with ESMTPS id cu5si20407756wjc.50.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 02:32:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.181 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.212.181; Received: by mail-wi0-f181.google.com with SMTP id l12so663727wiv.2 for ; Fri, 11 Oct 2013 02:32:35 -0700 (PDT) X-Received: by 10.194.239.40 with SMTP id vp8mr1142956wjc.45.1381483955432; Fri, 11 Oct 2013 02:32:35 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id gp9sm3873508wib.8.2013.10.11.02.32.33 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2013 02:32:34 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Enric Balletbo i Serra , Grant Likely , Jean-Christophe PLAGNIOL-VILLARD , Santosh Shilimkar , Stephen Warren , Javier Martinez Canillas Subject: [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ Date: Fri, 11 Oct 2013 11:32:29 +0200 Message-Id: <1381483949-12208-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When an IRQ is started on a GPIO line, mark this GPIO as IRQ in the gpiolib so we can keep track of the usage centrally. Cc: Enric Balletbo i Serra Cc: Grant Likely Cc: Jean-Christophe PLAGNIOL-VILLARD Cc: Santosh Shilimkar Cc: Stephen Warren Cc: Javier Martinez Canillas Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index d7c3ae3..7111c3b 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -634,6 +634,10 @@ static unsigned int nmk_gpio_irq_startup(struct irq_data *d) { struct nmk_gpio_chip *nmk_chip = irq_data_get_irq_chip_data(d); + if (gpio_lock_as_irq(&nmk_chip->chip, d->hwirq)) + dev_err(nmk_chip->chip.dev, + "unable to lock HW IRQ %lu for IRQ\n", + d->hwirq); clk_enable(nmk_chip->clk); nmk_gpio_irq_unmask(d); return 0; @@ -645,6 +649,7 @@ static void nmk_gpio_irq_shutdown(struct irq_data *d) nmk_gpio_irq_mask(d); clk_disable(nmk_chip->clk); + gpio_unlock_as_irq(&nmk_chip->chip, d->hwirq); } static struct irq_chip nmk_gpio_irq_chip = {