From patchwork Mon Dec 17 19:28:15 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: 10734175 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 56FC96C5 for ; Mon, 17 Dec 2018 19:28:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A37629870 for ; Mon, 17 Dec 2018 19:28:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E8F429937; Mon, 17 Dec 2018 19:28:19 +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 D962729727 for ; Mon, 17 Dec 2018 19:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727896AbeLQT2S (ORCPT ); Mon, 17 Dec 2018 14:28:18 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:64257 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727155AbeLQT2S (ORCPT ); Mon, 17 Dec 2018 14:28:18 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 43JWP51Plgz60; Mon, 17 Dec 2018 20:26:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1545074809; bh=HaoI/ENv3WxubsyUxvPuasJrSjears6aOirlWOH9fcw=; h=Date:From:Subject:To:Cc:From; b=eClHVyhOeozQEz0dqsUy8r1wvyh+jKnAfm9ueWHnsLdxEA5z1LzM6GIbXo9R5wDx6 1rTmYGezEK/xWupjqav5R+UAcFbeGZKG3NZo2K7KdJ9WWjf35KwrySB1DxCL9JKnFF OFZSdNYTFzFUREwft9jNZncNpGviXS1Dbw4xvChc5dTa2qxY2ifQg9DmPkccEitv3z 7nJMRdhO0ZL8U1TmokQRq4wztSya2RdPBEfefu7yLpLg/bsNg0rwRKvQE+00/tzWac 7AId3z2rXeBBikwImILXqf5T94elU8gDMze4nfJHi+ZlsKsDcZfpD7NgQQ6Kz8WABk wJ01qmVBDSbxw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Mon, 17 Dec 2018 20:28:15 +0100 Message-Id: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v2 1/2] power: supply: bq25890: fix BAT_COMP field definition MIME-Version: 1.0 To: linux-pm@vger.kernel.org Cc: Sebastian Reichel , Angus Ainslie (Purism) , Krzysztof Kozlowski 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 --- v2: rebased onto v4.20-rc7 --- 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 70b90db5ae38..3f6fb49c956c 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -183,7 +183,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), // 5-7 on BQ25896 + [F_BATCMP] = REG_FIELD(0x08, 5, 7), [F_VCLAMP] = REG_FIELD(0x08, 2, 4), [F_TREG] = REG_FIELD(0x08, 0, 1), /* REG09 */