From patchwork Tue Feb 5 19:48:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 14564 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 98AD923E92 for ; Tue, 5 Feb 2013 19:49:23 +0000 (UTC) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by fiordland.canonical.com (Postfix) with ESMTP id 19EF6A1883C for ; Tue, 5 Feb 2013 19:49:23 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id m18so320284vcm.8 for ; Tue, 05 Feb 2013 11:49:22 -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 :in-reply-to:references:mime-version:content-type:x-gm-message-state; bh=9+r/Opx5ORCzxP63CoFc0ClVjh7SRO1EVzuNawY27Kw=; b=dYE70Gt/Mkbb69r7LJBCdtoT1Fb4dYGL1qEPpqnjLTEDnE8of6W1AjDBW+UcaYw1A2 xGugU8hiTshfI+ZFVIQfm1jroTxvhp+K1PqlvDKxsAlBk01IjA/SeiVYvRW6bDwzx9CT 0O6OlgeSyqpnjhDAMzxqSHW4G/D3Hj7uta7C7ND8BACBtYgXIi8bkL9Nm3LX2ZzdI6aJ I9gMF/frJ60QIgFi1IZ/B0QcsnbGoOYwAtpzMeUi9NuGc/7L5V+SwzWDLkh5kUr1Mi9D l5p6DuC1K97Hjk6EoJ6QB+fFRz98ErrXXmMdjuOn/3eapqaKV2ZsbTvnDwdmmH8noPkT wy0w== X-Received: by 10.52.27.50 with SMTP id q18mr25965245vdg.20.1360093762609; Tue, 05 Feb 2013 11:49:22 -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.252.8 with SMTP id zo8csp143960vec; Tue, 5 Feb 2013 11:49:22 -0800 (PST) X-Received: by 10.14.214.67 with SMTP id b43mr88354732eep.33.1360093761625; Tue, 05 Feb 2013 11:49:21 -0800 (PST) Received: from eu1sys200aog114.obsmtp.com (eu1sys200aog114.obsmtp.com [207.126.144.137]) by mx.google.com with SMTP id k48si36946844een.112.2013.02.05.11.49.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Feb 2013 11:49:21 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.137 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.137; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.137 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-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob114.postini.com ([207.126.147.11]) with SMTP ID DSNKURFiLlTCV3uk6uPDwlFBMbkV8F2luydR@postini.com; Tue, 05 Feb 2013 19:49:21 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 97ECCAE; Tue, 5 Feb 2013 19:40:49 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id BD3B4D42; Tue, 5 Feb 2013 19:48:58 +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 53FE624C2AB; Tue, 5 Feb 2013 20:48:48 +0100 (CET) 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, 5 Feb 2013 20:48:57 +0100 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Lee Jones , Samuel Ortiz , Linus Walleij Subject: [PATCH 02/14] mfd: ab8500: provide a irq_set_type() function Date: Tue, 5 Feb 2013 20:48:23 +0100 Message-ID: <1360093715-6348-3-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 In-Reply-To: <1360093715-6348-1-git-send-email-linus.walleij@stericsson.com> References: <1360093715-6348-1-git-send-email-linus.walleij@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlm2/vXP8NrD1sDo0OA1HXOTbreLtfKG2n2ALFyEKOWi5Hqw5cMS2milP6R8H84NIINSGwY From: Lee Jones In the AB8500 IRQ mask and unmask functions, we rely on testing for IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING interrupts to physically mask and unmask the correct interrupt lines. In order for us to do that, the trigger needs to be set in the associated flags. However, unless a irq_set_type() function pointer is passed when registering the IRQ chip, the IRQ subsystem will refuse to do it. For that reason, we're providing one. Cc: Samuel Ortiz Signed-off-by: Lee Jones Signed-off-by: Linus Walleij --- Sam, it'd be nice if you could ACK these first four patches, the series basically simplifies things a lot by not cascading the AB8500 IRQs and duplicate code in the pinctrl driver. --- drivers/mfd/ab8500-core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index e1ba0be..aa5937e 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -403,6 +403,11 @@ static void ab8500_irq_unmask(struct irq_data *data) ab8500->mask[index] &= ~mask; } +static int ab8500_irq_set_type(struct irq_data *data, unsigned int type) +{ + return 0; +} + static struct irq_chip ab8500_irq_chip = { .name = "ab8500", .irq_bus_lock = ab8500_irq_lock, @@ -410,6 +415,7 @@ static struct irq_chip ab8500_irq_chip = { .irq_mask = ab8500_irq_mask, .irq_disable = ab8500_irq_mask, .irq_unmask = ab8500_irq_unmask, + .irq_set_type = ab8500_irq_set_type, }; static int ab8500_handle_hierarchical_line(struct ab8500 *ab8500,