From patchwork Fri Feb 15 12:56:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14890 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 083C423E01 for ; Fri, 15 Feb 2013 12:57:35 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id A474FA1844A for ; Fri, 15 Feb 2013 12:57:34 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id m1so2957306ves.8 for ; Fri, 15 Feb 2013 04:57:34 -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:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=iO/O/qbT4OPeQwGGNc063KqgQwxhgYhXl1Xor9BIMSc=; b=pvktn602CNQw7n6SDmrUqOh9zHGazQNcuLHCztig5mZMIPHMNYyIZViLkMmP/TV6aM n/Lrl+GIy7oC8wQwzpfrC+hbhwcdvZvPmnq+Bv5wpIhuvAHpFFHDXzrMbGx8NJbk8Oil SLxmH+DLE1zgrjN6vKCpAfw22+Tg3ydjwwV5YNekC9DwGlRHyXRhan0UbSjP0/ZMzTrk b8V82oQT2sYXEdS0ImANsFJDEs0MNURB68YBjEaC7zlY+WSF8bnO7ZEuVeTancpooQn2 fLCW27BragGT7wihvnoCFdKJx/btp/ZFCcaD8aPjn+1JLAI1iTRIlW72o0mmK/QhrZUq uNmw== X-Received: by 10.58.213.37 with SMTP id np5mr2867364vec.54.1360933054139; Fri, 15 Feb 2013 04:57:34 -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.221.4.5 with SMTP id oa5csp11364vcb; Fri, 15 Feb 2013 04:57:33 -0800 (PST) X-Received: by 10.194.122.98 with SMTP id lr2mr4152785wjb.7.1360933050872; Fri, 15 Feb 2013 04:57:30 -0800 (PST) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by mx.google.com with ESMTPS id by4si1050702wib.57.2013.02.15.04.57.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:57:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.179 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.179; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.179 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-wi0-f179.google.com with SMTP id ez12so1117803wid.6 for ; Fri, 15 Feb 2013 04:57:30 -0800 (PST) X-Received: by 10.180.88.40 with SMTP id bd8mr5807420wib.17.1360933050303; Fri, 15 Feb 2013 04:57:30 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id j4sm2852410wiz.10.2013.02.15.04.57.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:57:29 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: arnd@arndb.de, linus.walleij@stericsson.com, Marcus Cooper , Lee Jones Subject: [PATCH 05/35] mfd: ab8500-core: APE Interrupts are not cleared Date: Fri, 15 Feb 2013 12:56:36 +0000 Message-Id: <1360933026-30325-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360933026-30325-1-git-send-email-lee.jones@linaro.org> References: <1360933026-30325-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQluiai4sKmdMKYOoEu6R7AdxE9bvqw+ethB/WZsDCcMk9v1nfb+0d4UfkFoTXB6ykiUUHdY From: Marcus Cooper There are missing register descriptions from the AB8505 user manual and these need to be masked so that the APEINT line can toggle. This patch also affects the behaviour of AB9540. Signed-off-by: Marcus Cooper Signed-off-by: Lee Jones Reviewed-by: Maxime COQUELIN Reviewed-by: Alexandre TORGUE Reviewed-by: Mattias WALLIN --- drivers/mfd/ab8500-core.c | 5 +++-- include/linux/mfd/abx500/ab8500.h | 38 +++++++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 05a7af4..7c20728 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -94,6 +94,7 @@ #define AB8500_IT_MASK22_REG 0x55 #define AB8500_IT_MASK23_REG 0x56 #define AB8500_IT_MASK24_REG 0x57 +#define AB8500_IT_MASK25_REG 0x58 /* * latch hierarchy registers @@ -129,9 +130,9 @@ static const int ab8500_irq_regoffset[AB8500_NUM_IRQ_REGS] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 18, 19, 20, 21, }; -/* AB9540 support */ +/* AB9540 / AB8505 support */ static const int ab9540_irq_regoffset[AB9540_NUM_IRQ_REGS] = { - 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 18, 19, 20, 21, 12, 13, 24, + 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 18, 19, 20, 21, 12, 13, 24, 5, 22, 23 }; static const char ab8500_version_str[][7] = { diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index fa7173d..f24df87 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -165,12 +165,12 @@ enum ab8500_version { #define AB8500_INT_ID_DET_R3R 94 #define AB8500_INT_ID_DET_R4R 95 /* ab8500_irq_regoffset[12] -> IT[Source|Latch|Mask]21 */ -#define AB8500_INT_ID_WAKEUP_F 96 -#define AB8500_INT_ID_DET_R1F 98 -#define AB8500_INT_ID_DET_R2F 99 -#define AB8500_INT_ID_DET_R3F 100 -#define AB8500_INT_ID_DET_R4F 101 -#define AB8500_INT_CHAUTORESTARTAFTSEC 102 +#define AB8500_INT_ID_WAKEUP_F 96 /* not 8505/9540 */ +#define AB8500_INT_ID_DET_R1F 98 /* not 8505/9540 */ +#define AB8500_INT_ID_DET_R2F 99 /* not 8505/9540 */ +#define AB8500_INT_ID_DET_R3F 100 /* not 8505/9540 */ +#define AB8500_INT_ID_DET_R4F 101 /* not 8505/9540 */ +#define AB8500_INT_CHAUTORESTARTAFTSEC 102 /* not 8505/9540 */ #define AB8500_INT_CHSTOPBYSEC 103 /* ab8500_irq_regoffset[13] -> IT[Source|Latch|Mask]22 */ #define AB8500_INT_USB_CH_TH_PROT_F 104 @@ -181,7 +181,7 @@ enum ab8500_version { #define AB8500_INT_CHCURLIMHSCHIRP 110 #define AB8500_INT_XTAL32K_KO 111 -/* Definitions for AB9540 */ +/* Definitions for AB9540 / AB8505 */ /* ab8500_irq_regoffset[14] -> IT[Source|Latch|Mask]13 */ #define AB9540_INT_GPIO50R 113 #define AB9540_INT_GPIO51R 114 /* not 8505 */ @@ -204,6 +204,24 @@ enum ab8500_version { #define AB8505_INT_KEYDEGLITCH 132 #define AB8505_INT_MODPWRSTATUSF 134 #define AB8505_INT_MODPWRSTATUSR 135 +/* ab8500_irq_regoffset[17] -> IT[Source|Latch|Mask]6 */ +#define AB8500_INT_HOOK_DET_NEG_F 138 +#define AB8500_INT_HOOK_DET_NEG_R 139 +#define AB8500_INT_HOOK_DET_POS_F 140 +#define AB8500_INT_HOOK_DET_POS_R 141 +#define AB8500_INT_PLUG_DET_COMP_F 142 +#define AB8500_INT_PLUG_DET_COMP_R 143 +/* ab8500_irq_regoffset[18] -> IT[Source|Latch|Mask]23 */ +#define AB8505_INT_COLL 144 +#define AB8505_INT_RESERR 145 +#define AB8505_INT_FRAERR 146 +#define AB8505_INT_COMERR 147 +#define AB8505_INT_SPDSET 148 +#define AB8505_INT_DSENT 149 +#define AB8505_INT_DREC 150 +#define AB8505_INT_ACC_INT 151 +/* ab8500_irq_regoffset[19] -> IT[Source|Latch|Mask]24 */ +#define AB8505_INT_NOPINT 152 /* * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the @@ -213,13 +231,13 @@ enum ab8500_version { * which is larger. */ #define AB8500_NR_IRQS 112 -#define AB8505_NR_IRQS 136 -#define AB9540_NR_IRQS 136 +#define AB8505_NR_IRQS 153 +#define AB9540_NR_IRQS 153 /* This is set to the roof of any AB8500 chip variant IRQ counts */ #define AB8500_MAX_NR_IRQS AB9540_NR_IRQS #define AB8500_NUM_IRQ_REGS 14 -#define AB9540_NUM_IRQ_REGS 17 +#define AB9540_NUM_IRQ_REGS 20 /** * struct ab8500 - ab8500 internal structure