From patchwork Mon Dec 17 02:52:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10732679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49295746 for ; Mon, 17 Dec 2018 02:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3426929CF7 for ; Mon, 17 Dec 2018 02:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25D8929CF8; Mon, 17 Dec 2018 02:52:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C4229CDB for ; Mon, 17 Dec 2018 02:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726347AbeLQCw2 (ORCPT ); Sun, 16 Dec 2018 21:52:28 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:15428 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731256AbeLQCw2 (ORCPT ); Sun, 16 Dec 2018 21:52:28 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 43J5J52sLnz8Z; Mon, 17 Dec 2018 03:51:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1545015061; bh=VfIYIOTzxWGB9s1rj+codWEwRlfQK+mROmPj/OXqoCs=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=nuVsyzwS7cIb44MFl3L5BIuS3/NR/8U/BYEd7+YpYR7ozhR2svsj8l2hJniP1QFl0 DUO+GkS2Mt8yFm0ebhwQLm1HwMDd93dl1ze2tgwlzS8KAsqWHwkfgPs7unON5uRiVi ebngtVyZQ8UvLIvpvJWZF6BLhBmXhTYidJ8Nx27E63U1O8tnyF0vIp1kzfha913+uz /wT9vwWQjDTp1D0QMCZNZWOeRVpM37XdKtRGJ+eZTc8Qsg7OOuqtYCNCMefLR36Wpw XlEqKv58ubOyzID0pkMV3SRMNEaRxDjYyL6BFEmYsrlvxCK8YBE/qabLXhB8E14VWM GeJF8iSQvqOWg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Mon, 17 Dec 2018 03:52:27 +0100 Message-Id: <63add1fcf261eda715a3d9ffb3d43692ae1aec7d.1545014442.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 1/3] power: supply: bq25890: fix BAT_COMP field definition MIME-Version: 1.0 To: linux-pm@vger.kernel.org Cc: Sebastian Reichel , Laurentiu Palcu Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to datasheet, BAT_COMP field spans bits 5-7. The rest of the code seems to assume this already. Fixes: 4aeae9cb0dad ("power_supply: Add support for TI BQ25890 charger chip") Signed-off-by: Michał Mirosław --- drivers/power/supply/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index 8e2c41ded171..db66f38d6b04 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -181,7 +181,7 @@ static const struct reg_field bq25890_reg_fields[] = { [F_CHG_TMR] = REG_FIELD(0x07, 1, 2), [F_JEITA_ISET] = REG_FIELD(0x07, 0, 0), /* REG08 */ - [F_BATCMP] = REG_FIELD(0x08, 6, 7), + [F_BATCMP] = REG_FIELD(0x08, 5, 7), [F_VCLAMP] = REG_FIELD(0x08, 2, 4), [F_TREG] = REG_FIELD(0x08, 0, 1), /* REG09 */