From patchwork Fri Jul 6 07:52:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1163501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1A7343FE80 for ; Fri, 6 Jul 2012 07:56:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sn3LX-0004bN-ET; Fri, 06 Jul 2012 07:52:59 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sn3LO-0004aW-HU for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2012 07:52:54 +0000 Received: by eekd17 with SMTP id d17so3537884eek.36 for ; Fri, 06 Jul 2012 00:52:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=22TamBuDVS85N26NqgivMP8o/9+hvvHtbcoCoHiGyvk=; b=Wgq5ljVzDGVgo1WQk3QyGNzQKOdceXKzdvSOJl/hLpMHwJLNoWXoYoK6lwxRBmzmR5 J7/UHaF9i4CduquKmJr2MoObqAY0US0sGVGIMMZj5P1EeA7ifFMFruxQ1/sAE4Xv0VA0 AFflkcXHGFHAPWb76jefkHmcCiFiagnBPf4M1TmPiERt+MbIxD4FOaZdHzMwQANx3kYc fiMJIj8oIAHTbNw8fbhyPXRxtWSDpQdzVZ10oh4tmhrBa3KptiK3WTst0AyjQUIIi/gr wVcHM5E775FazfjIChSB1EH74tQEe4kb7Nuf/QWE78I6SLJDlXU/rpyxMSdVzvkPs3Em e3fg== Received: by 10.14.94.142 with SMTP id n14mr7041825eef.147.1341561166723; Fri, 06 Jul 2012 00:52:46 -0700 (PDT) Received: from [192.168.0.135] (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id u56sm69145012eef.7.2012.07.06.00.52.44 (version=SSLv3 cipher=OTHER); Fri, 06 Jul 2012 00:52:45 -0700 (PDT) Message-ID: <4FF6994B.9040801@linaro.org> Date: Fri, 06 Jul 2012 08:52:43 +0100 From: Lee Jones User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com Subject: [PATCH 7/9] Input: ab8500-ponkey: Create AB8500 domain IRQ mapping References: <1341493572-29735-1-git-send-email-lee.jones@linaro.org> In-Reply-To: <1341493572-29735-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnbsud5u3TZ2Vh+oMTFtD3P2gDz+bnSVYhvE/PjEacRYt9esfZU4j2f3JHl0c8Q0zHNqANf X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: STEricsson_nomadik_linux@list.st.com, Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Sorry Dmitry, looks like I missed you off of the CC list on this one. Here it is again: 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(+) } + 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) { 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;