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: 13982 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 68AAB23E27 for ; Fri, 11 Jan 2013 13:13:39 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 2143DA1849E for ; Fri, 11 Jan 2013 13:13:39 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so1398541vbb.31 for ; Fri, 11 Jan 2013 05:13:38 -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=Gk0CWRZ/MhytTLCK8CHDn7VUvNzey8lt+zkAoFkyZo4=; b=pzzzeh7SWca4aZ25BzPnGuyFKlzGNu1OhP+u7hvddcS326ZVXrgx47h3OBDFEku2Oe phgQkSNaziYoCPyOTCmZwf6pNDIfDZQL9pHvCO6tNFVUcAEbwKF7ZJQJgke7ZXVptm0/ fIVEbCThKPiOABX4AxfcWmqE54KbkykaJf2ak+4Znvr6deBaAaS3caA0aFXr2CPPJNmM y8evJV1+fcsO84est92lyYs9wC5e2K+8Igz6dr17wWwJmIcmZRUpCuAkxnnmc7TrBjn5 QVUZSlJmM312AQ1itFWL1Sgnf2ncEGprssEAjL6xN8uunj4ZsGShc2Vs5yGDPaus17Xq V2kQ== X-Received: by 10.52.176.6 with SMTP id ce6mr82020494vdc.57.1357910018654; Fri, 11 Jan 2013 05:13:38 -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.145.101 with SMTP id st5csp111238veb; Fri, 11 Jan 2013 05:13:38 -0800 (PST) X-Received: by 10.180.92.36 with SMTP id cj4mr15259384wib.23.1357910017755; Fri, 11 Jan 2013 05:13:37 -0800 (PST) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by mx.google.com with ESMTPS id e6si8663350wja.63.2013.01.11.05.13.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jan 2013 05:13:37 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.180 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.180; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.180 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-f180.google.com with SMTP id hj13so1014307wib.13 for ; Fri, 11 Jan 2013 05:13:37 -0800 (PST) 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 Cc: arnd@arndb.de, linus.walleij@stericsson.com, cbouatmailru@gmail.com, Hakan Berg , Lee Jones 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: ALoCoQl4nQp6F8hvgs0zkSQFL8z56HtuwXkCtmzwztdHMOBlQYFNj1c42aHHdp0MAReYo2ODNxet 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) {