From patchwork Mon Jan 21 12:03:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14149 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 5251423E33 for ; Mon, 21 Jan 2013 12:04:43 +0000 (UTC) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by fiordland.canonical.com (Postfix) with ESMTP id EC57EA18DD5 for ; Mon, 21 Jan 2013 12:04:42 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fl17so1673671vcb.13 for ; Mon, 21 Jan 2013 04:04:42 -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=hnIQ4e2YjlBG2J6A+7M0bRncMexkorkfbW4UOUTC2jk=; b=K9+CAo3v/Sd0sMRHWHCJ9n69PduxTc5ID7wjsgFbSxL3NpzbFOwV0AG19HOnGrQKoO l/flY9hilmcRC7qyRgPCDI9gCd8tTxTVxJ2oi43rdgw/ovk90u6NAZkWrIs2o7TKLDwj gZar2g0KgHLG7zMfEb+2JFb2j8cXDSJzmHIuMkU/yyPG++Kt8ns6oQjrawjvOsMPWuY7 sj7+EXLdsIHLubUWo1xsVgsiJhpivb4fWXokQ0RxXY+/lt39BxO5kINveUhE0imSA5Rw MW76C6rFSKz1OGmREdHK49qDM0GlnDt0hetkGmfYVHtmVnjdu03Sj1aL5UCaBkmuVOZF jLkg== X-Received: by 10.52.88.168 with SMTP id bh8mr16386389vdb.51.1358769882505; Mon, 21 Jan 2013 04:04:42 -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 st5csp197703veb; Mon, 21 Jan 2013 04:04:37 -0800 (PST) X-Received: by 10.194.236.166 with SMTP id uv6mr25896669wjc.34.1358769869966; Mon, 21 Jan 2013 04:04:29 -0800 (PST) Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]) by mx.google.com with ESMTPS id cu8si3816149wib.27.2013.01.21.04.04.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:04:29 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22a is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::22a; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::22a 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-we0-f170.google.com with SMTP id r1so1640003wey.29 for ; Mon, 21 Jan 2013 04:04:29 -0800 (PST) X-Received: by 10.180.73.202 with SMTP id n10mr14993028wiv.17.1358769866429; Mon, 21 Jan 2013 04:04:26 -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 i2sm16575305wiw.3.2013.01.21.04.04.24 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:04:25 -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, anton.vorontsov@linaro.org, cbou@mail.ru, Lee Jones Subject: [PATCH 05/24] ab8500-charger: Kick watchdog Date: Mon, 21 Jan 2013 12:03:41 +0000 Message-Id: <1358769840-4763-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358769840-4763-1-git-send-email-lee.jones@linaro.org> References: <1358769840-4763-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQntQfNqvc1jivNpRXxUhL4N7gYJ9Fyeri2BjIxpz/nTIuuN8lHtIfipw12tYdwgCoudgFur Kicks the watchdog so charging will not stop. Signed-off-by: Lee Jones --- drivers/power/abx500_chargalg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 78b6235..830b2dd 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -603,6 +603,8 @@ static void abx500_chargalg_hold_charging(struct abx500_chargalg *di) static void abx500_chargalg_start_charging(struct abx500_chargalg *di, int vset, int iset) { + bool start_chargalg_wd = true; + switch (di->chg_info.charger_type) { case AC_CHG: dev_dbg(di->dev, @@ -620,8 +622,12 @@ static void abx500_chargalg_start_charging(struct abx500_chargalg *di, default: dev_err(di->dev, "Unknown charger to charge from\n"); + start_chargalg_wd = false; break; } + + if (start_chargalg_wd && !delayed_work_pending(&di->chargalg_wd_work)) + queue_delayed_work(di->chargalg_wq, &di->chargalg_wd_work, 0); } /**