From patchwork Mon Jan 21 12:03:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14168 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 1AB9C23E33 for ; Mon, 21 Jan 2013 12:05:13 +0000 (UTC) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by fiordland.canonical.com (Postfix) with ESMTP id B34C4A18DD2 for ; Mon, 21 Jan 2013 12:05:12 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id b13so5527279vby.19 for ; Mon, 21 Jan 2013 04:05:12 -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=EYjkcWwAMyaSpJASXjGUCr6P4PJlp6CsPJzNaRfWD2M=; b=p5ggxYhAH8vIj4itAcFVa2ZCh6Pv4bFByZ64qEGdi0Jtgth0E3HLvU0Fg5nQRoAQlz 9Q9W27Vx2b2csjVb8Rnk+MDSWOmL1Rh2hRetp2XY7gEzKV/Bya+LezZOBjKRvSEQ1YI1 93RwD956TZhw9M58sjpTtdHs+ZNUhNbTvsk1G26/VP815BA235+jyWYpb5uN7zPP2HGo UqH145ypc228Kr/87BfqRVRirvh8YWMMT1Hbc+HQ/+nUlPW5IH8mUJWZhia/LiLW9bjb HTetB2o9TAud8DD0LgPNYbHak2OyOHJOcCxGu8NiK9++HM6AP53YEB9oICJB2tfrWx+h FVqw== X-Received: by 10.221.0.79 with SMTP id nl15mr19125519vcb.41.1358769912266; Mon, 21 Jan 2013 04:05:12 -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 st5csp197751veb; Mon, 21 Jan 2013 04:05:11 -0800 (PST) X-Received: by 10.180.19.136 with SMTP id f8mr15125383wie.0.1358769903926; Mon, 21 Jan 2013 04:05:03 -0800 (PST) Received: from mail-we0-x233.google.com ([2a00:1450:400c:c03::233]) by mx.google.com with ESMTPS id h19si3806708wiv.105.2013.01.21.04.05.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:05:03 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::233 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::233; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::233 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-f179.google.com with SMTP id t9so435026wey.38 for ; Mon, 21 Jan 2013 04:05:03 -0800 (PST) X-Received: by 10.180.20.138 with SMTP id n10mr19635631wie.0.1358769903477; Mon, 21 Jan 2013 04:05:03 -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.05.01 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:05:02 -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 23/24] ab8500-bm: Fix minor niggles experienced during testing Date: Mon, 21 Jan 2013 12:03:59 +0000 Message-Id: <1358769840-4763-24-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: ALoCoQl12XQDeFVTDezmIVLAJ3mJ4vq9iYXuI+zWlIKp6/jJqb5BCY1u9fUIt7jO3uLk3/UtEhaz When compile testing the new AB8500 Battery Management changes due for inclusion into upstream, there were a few minor niggles which required repairing, or adapting for use against the Mainline kernel. This patch is a collection of them all. Signed-off-by: Lee Jones --- drivers/power/ab8500_fg.h | 6 ++++-- drivers/power/abx500_chargalg.c | 4 ++-- drivers/power/pm2301_charger.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/power/ab8500_fg.h b/drivers/power/ab8500_fg.h index 946840b..bb78dc9 100644 --- a/drivers/power/ab8500_fg.h +++ b/drivers/power/ab8500_fg.h @@ -182,6 +182,7 @@ struct ab8500_fg_test { * @fg_check_hw_failure_work: Work for checking HW state * @cc_lock: Mutex for locking the CC * @fg_kobject: Structure of type kobject + * @test: Structure of type ab8500_fg_test for test purpose */ struct ab8500_fg { struct device *dev; @@ -224,6 +225,7 @@ struct ab8500_fg { struct delayed_work fg_check_hw_failure_work; struct mutex cc_lock; struct kobject fg_kobject; + struct ab8500_fg_test test; }; extern char *discharge_state[]; @@ -232,8 +234,8 @@ extern char *charge_state[]; int ab8500_fg_coulomb_counter(struct ab8500_fg *di, bool enable); void ab8500_fg_charge_state_to(struct ab8500_fg *di, enum ab8500_fg_charge_state new_state); -void ab8500_fg_discharge_state_to(struct ab8500_fg *di, - enum ab8500_fg_charge_state new_state); +static void ab8500_fg_discharge_state_to(struct ab8500_fg *di, + enum ab8500_fg_discharge_state new_state); /* test initialization */ #ifdef CONFIG_AB8500_BM_DEEP_DEBUG void ab8500_fg_test_init(struct ab8500_fg *di); diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 694f592..cacf512 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -1664,8 +1664,8 @@ static int abx500_chargalg_get_property(struct power_supply *psy, static ssize_t ab8500_chargalg_sysfs_show(struct kobject *kobj, struct attribute *attr, char *buf) { - struct ab8500_chargalg *di = container_of(kobj, - struct ab8500_chargalg, chargalg_kobject); + struct abx500_chargalg *di = container_of(kobj, + struct abx500_chargalg, chargalg_kobject); return sprintf(buf, "%d\n", di->susp_status.ac_suspended && diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c index 14e37b2..5ebae88 100644 --- a/drivers/power/pm2301_charger.c +++ b/drivers/power/pm2301_charger.c @@ -22,8 +22,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -867,7 +867,7 @@ static int __devinit pm2xxx_wall_charger_probe(struct i2c_client *i2c_client, /* get parent data */ pm2->dev = &i2c_client->dev; - pm2->gpadc = ab8500_gpadc_get(); + pm2->gpadc = ab8500_gpadc_get("ab8500-gpadc.0"); pm2->pm2_int = &pm2xxx_int;