From patchwork Thu Sep 27 20:08:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 11802 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 8833724140 for ; Thu, 27 Sep 2012 20:09:57 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2F434A18B18 for ; Thu, 27 Sep 2012 20:09:57 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so5234855iej.11 for ; Thu, 27 Sep 2012 13:09:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=iwK35BUbDBJ/mlMiRIReu66HjKBV6iNT6DNjkaERjMg=; b=AaX9YRG75jMmFhDryLBRnquB1dvrbq408lUng2uJupDVSP16gHjd2qqsM2EnGykcYU Nk+OIdtwyKOacTVZjOXWt0HbOfWpRt3lCxwuXRqEsAge6KF6L3Cd0bq8gRqX4CALrIZu GgO+Bbrk9tDJzflqVJ/fj60I3Tj7EC0BoqernQDdn9prz7NRr7ems9+kUDn/HajLve0e 2fN/qOz5rmQav0YxeLY8m/D8L8eC99E4wV9KRir0WB9KlRF3jd1saKZcDvqc/poRlSrd 9blqjfaGJIeS6pqFukqTNYddBy1fPt4rHahf2gUl6jX2Y4BEEtNsDkExA0IDwUpksCcO Wlog== Received: by 10.50.217.229 with SMTP id pb5mr4699007igc.28.1348776596982; Thu, 27 Sep 2012 13:09:56 -0700 (PDT) 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.50.184.232 with SMTP id ex8csp436328igc; Thu, 27 Sep 2012 13:09:56 -0700 (PDT) Received: by 10.66.81.231 with SMTP id d7mr12156913pay.50.1348776596460; Thu, 27 Sep 2012 13:09:56 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id pi9si5467641pbb.12.2012.09.27.13.09.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 13:09:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of mathieu.poirier@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of mathieu.poirier@linaro.org) smtp.mail=mathieu.poirier@linaro.org Received: by mail-pb0-f50.google.com with SMTP id md4so1686045pbc.37 for ; Thu, 27 Sep 2012 13:09:56 -0700 (PDT) Received: by 10.68.234.71 with SMTP id uc7mr14444284pbc.72.1348776596226; Thu, 27 Sep 2012 13:09:56 -0700 (PDT) Received: from localhost.localdomain (S0106002369de4dac.cg.shawcable.net. [70.73.24.112]) by mx.google.com with ESMTPS id sa2sm1587890pbc.4.2012.09.27.13.09.55 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 13:09:55 -0700 (PDT) From: mathieu.poirier@linaro.org To: patches@linaro.org Subject: [PATCH 29/57] power: ab8500_fg: Goto INIT_RECOVERY when charger removed Date: Thu, 27 Sep 2012 14:08:46 -0600 Message-Id: <1348776554-10019-30-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1348776554-10019-1-git-send-email-mathieu.poirier@linaro.org> References: <1348776554-10019-1-git-send-email-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmaRiwwMXjNW8saEH6/QdOWDJ9j6HSlFruCsuqgkuM3vk/3aySLIcOhUScOtbPYxFSP6rn8 From: Martin Bergström When the charger is removed we need to go to INIT_RECOVERY state instead of directly to RECOVERY state. Signed-off-by: Martin Bergstrom Signed-off-by: Mathieu Poirier Reviewed-by: Marcus COOPER Reviewed-by: Jonas ABERG --- drivers/power/ab8500_fg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index 861927d..e7a0e1f 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c @@ -1644,7 +1644,7 @@ static void ab8500_fg_algorithm_discharging(struct ab8500_fg *di) if (di->recovery_needed) { ab8500_fg_discharge_state_to(di, - AB8500_FG_DISCHARGE_RECOVERY); + AB8500_FG_DISCHARGE_INIT_RECOVERY); queue_delayed_work(di->fg_wq, &di->fg_periodic_work, 0);