From patchwork Fri Jan 11 13:12:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1966021 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 5EFA23FF0F for ; Fri, 11 Jan 2013 13:21:36 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TteUM-0003iq-Bo; Fri, 11 Jan 2013 13:17:38 +0000 Received: from mail-wg0-f52.google.com ([74.125.82.52]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TteQV-0001NG-Md for linux-arm-kernel@lists.infradead.org; Fri, 11 Jan 2013 13:13:42 +0000 Received: by mail-wg0-f52.google.com with SMTP id 12so833676wgh.7 for ; Fri, 11 Jan 2013 05:13:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Gk0CWRZ/MhytTLCK8CHDn7VUvNzey8lt+zkAoFkyZo4=; b=W8gBfQOYBI3Za6yFcL/SYORkADfaAQ0d6TUH1BbB/Uyx9/itEKyAyom4KjKpbMUYQf hwdsOV5fRTBkMRx/cDIZ/6wsHG/497YMvIr5y6pDHR641rdrvP+98TMTe/TnJY8suFEs eSWrByRTsvMgBs5ADHk3JZwY+bNK371HXUn5GlUJw468YU3fV4y07WAh/o/8Yemre0Ba U5w/wr5J5Fg00FNQ5tVoP59xnEKV89Buiq+zuQz6TvrBvji74U3LdCL5WMHIt+Fv6dIU 3rrlLxlyp+nZvYVHFKq9TiqPxZF45baqQHnonwnEWxRbCTlvIzaq0w8T6H5TgGB2QpMe j5fQ== X-Received: by 10.180.85.165 with SMTP id i5mr15202116wiz.11.1357910017370; Fri, 11 Jan 2013 05:13:37 -0800 (PST) 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 p2sm7204515wic.7.2013.01.11.05.13.35 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jan 2013 05:13:36 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/18] power: ab8500_btemp: Ignore false btemp low interrupt Date: Fri, 11 Jan 2013 13:12:57 +0000 Message-Id: <1357909986-9262-10-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1357909986-9262-1-git-send-email-lee.jones@linaro.org> References: <1357909986-9262-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQncUN92z2XYFW3QEtctukyk4rwoHBaIUzWnEulvByhdWUsF8O7AVNZ9BNLn2/OpAQXNAuHW X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130111_081340_001213_C5A7A566 X-CRM114-Status: GOOD ( 13.28 ) 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.82.52 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Lee Jones , Hakan Berg , linus.walleij@stericsson.com, arnd@arndb.de, cbouatmailru@gmail.com 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Hakan Berg Ignore the low btemp interrupts for ab8500 3.0 and 3.3 Signed-off-by: Lee Jones Signed-off-by: Hakan Berg Reviewed-by: Jonas ABERG Tested-by: Marcus COOPER --- drivers/power/ab8500_btemp.c | 8 ++++---- include/linux/mfd/abx500/ab8500.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c index 3ad47b0..6f6a715 100644 --- a/drivers/power/ab8500_btemp.c +++ b/drivers/power/ab8500_btemp.c @@ -622,9 +622,9 @@ static irqreturn_t ab8500_btemp_templow_handler(int irq, void *_di) { struct ab8500_btemp *di = _di; - if (is_ab8500_2p0_or_earlier(di->parent)) { + if (is_ab8500_3p3_or_earlier(di->parent)) { dev_dbg(di->dev, "Ignore false btemp low irq" - " for ABB cut 1.0, 1.1 and 2.0\n"); + " for ABB cut 1.0, 1.1, 2.0 and 3.3\n"); } else { dev_crit(di->dev, "Battery temperature lower than -10deg c\n"); @@ -738,10 +738,10 @@ static int ab8500_btemp_get_temp(struct ab8500_btemp *di) int temp = 0; /* - * The BTEMP events are not reliabe on AB8500 cut2.0 + * The BTEMP events are not reliabe on AB8500 cut3.3 * and prior versions */ - if (is_ab8500_2p0_or_earlier(di->parent)) { + if (is_ab8500_3p3_or_earlier(di->parent)) { temp = di->bat_temp * 10; } else { if (di->events.btemp_low) { diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 1491044..46f5f62 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -335,6 +335,11 @@ static inline int is_ab8500_2p0_or_earlier(struct ab8500 *ab) return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT2P0)); } +static inline int is_ab8500_3p3_or_earlier(struct ab8500 *ab) +{ + return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT3P3)); +} + /* exclude also ab8505, ab9540... */ static inline int is_ab8500_2p0(struct ab8500 *ab) {