From patchwork Thu Jul 5 13:06:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9848 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 2D77023E16 for ; Thu, 5 Jul 2012 13:06:48 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id EAA94A182E7 for ; Thu, 5 Jul 2012 13:06:47 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so7960629ghb.11 for ; Thu, 05 Jul 2012 06:06:47 -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:in-reply-to:references :x-gm-message-state; bh=KTtA4hfo++/3P4AajWX8PtHHij671ICEIeGERUQnnI4=; b=TtF1C2stAvmecPaQC4/XUGnxn+yaOFFIQzws+S0T6Tjv51n4Mz8s76JAsJvNA0QRWS tOAD+YR7j2D4RgLFRehR8/lzCIbdEFTN0dwdLYOjr7ANz7RUqJhoc1UuExX5ZyHWFY1o 1Bcggrs2Pi/Axd90McNB7l3hfCxhp+SJlAkDOjBup0m1vMwM4BBBQv8DiXSiuWF8ham9 fpjUDQyVo7EBF2QHZXlSOrcToIuH40h15Yakox7r01OkKwbQ9PxZHKLy2CLx2S0Gtj+H 3QQBvk6SiyssmdzgBdXofZ0G6PWC8523q9a/fGPr+gXoGq9DU2irqdL00lkGiPnlWNd2 65gA== Received: by 10.50.40.193 with SMTP id z1mr16193741igk.0.1341493607278; Thu, 05 Jul 2012 06:06:47 -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.231.24.148 with SMTP id v20csp65220ibb; Thu, 5 Jul 2012 06:06:46 -0700 (PDT) Received: by 10.216.136.203 with SMTP id w53mr7988745wei.63.1341493606222; Thu, 05 Jul 2012 06:06:46 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id eo5si455051wib.0.2012.07.05.06.06.45 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Jul 2012 06:06:46 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f178.google.com with SMTP id f13so7479502wer.37 for ; Thu, 05 Jul 2012 06:06:45 -0700 (PDT) Received: by 10.180.98.69 with SMTP id eg5mr41945183wib.3.1341493605776; Thu, 05 Jul 2012 06:06:45 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id k8sm76767305wia.6.2012.07.05.06.06.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Jul 2012 06:06:45 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, Lee Jones Subject: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping Date: Thu, 5 Jul 2012 14:06:10 +0100 Message-Id: <1341493572-29735-8-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1341493572-29735-1-git-send-email-lee.jones@linaro.org> References: <1341493572-29735-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkuY1tYv0fLOSpFpUoV6xCSm6BGZAkoh40AXEwhQeHlVvGq++RNiUhp2je7O8xoWRFWIdxi Before we can use any domain allocated IRQ, we need to first create a map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq). We do this with a helper function provided by the AB8500 IRQ domain controller called ab8500_irq_get_virq(). We need to do this for both IRQs which the Power-On-Key driver uses; one for button press, the other for button depress. Signed-off-by: Lee Jones --- drivers/input/misc/ab8500-ponkey.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index 5ceb23e..ae4b683 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c @@ -82,6 +82,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev) input_set_capability(input, EV_KEY, KEY_POWER); + ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbf); error = request_any_context_irq(ponkey->irq_dbf, ab8500_ponkey_handler, 0, "ab8500-ponkey-dbf", ponkey); if (error < 0) { @@ -90,6 +91,7 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev) goto err_free_mem; } + ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, ponkey->irq_dbr); error = request_any_context_irq(ponkey->irq_dbr, ab8500_ponkey_handler, 0, "ab8500-ponkey-dbr", ponkey); if (error < 0) {