From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752061AbdAMPye (ORCPT ); Fri, 13 Jan 2017 10:54:34 -0500 Received: from dehamd084.servertools24.de ([31.47.243.162]:60155 "EHLO dehamd084.servertools24.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbdAMPyd (ORCPT ); Fri, 13 Jan 2017 10:54:33 -0500 Subject: Re: [PATCH] mfd: axp20x: Add AXP288 volatile registers. To: Lee Jones Cc: Chen-Yu Tsai , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170111194941.5425-1-oss@c-mauderer.de> <20170113140156.GE6864@dell> From: Christian Mauderer Message-ID: <941689ad-746c-99fa-a8c5-e98ef769d1c9@c-mauderer.de> Date: Fri, 13 Jan 2017 16:54:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170113140156.GE6864@dell> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <20170113155430.6702.72657@localhost.localdomain> X-PPP-Vhost: c-mauderer.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 13.01.2017 um 15:01 schrieb Lee Jones: > On Wed, 11 Jan 2017, Christian Mauderer wrote: > >> The axp288_fuelgauge driver and some other axp288_xxx are using a number >> of the registers of the chip that are changed by hardware (for example >> charge level). Because these registers are not marked as "volatile" in >> the regmap, a cached version is used instead of the correct register >> value. In case of the axp288_fuelgauge that leads to a battery level >> that only changes on reboot. This patch adds the volatile registers of >> the chip. >> >> Signed-off-by: Christian Mauderer >> --- >> drivers/mfd/axp20x.c | 3 +++ >> 1 file changed, 3 insertions(+) > > Applied, thanks. Thank you for applying it. > >> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c >> index ed918de84238..d74b3daca23f 100644 >> --- a/drivers/mfd/axp20x.c >> +++ b/drivers/mfd/axp20x.c >> @@ -118,7 +118,10 @@ static const struct regmap_range axp288_writeable_ranges[] = { >> }; >> >> static const struct regmap_range axp288_volatile_ranges[] = { >> + regmap_reg_range(AXP20X_PWR_INPUT_STATUS, AXP20X_PWR_OP_MODE), >> regmap_reg_range(AXP20X_IRQ1_EN, AXP20X_IPSOUT_V_HIGH_L), >> + regmap_reg_range(AXP20X_CC_CTRL, AXP288_FG_OCVL_REG), >> + regmap_reg_range(AXP288_FG_DES_CAP1_REG, AXP288_FG_CC_CAP_REG), >> }; >> >> static const struct regmap_access_table axp288_writeable_table = { >