linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Mauderer <oss@c-mauderer.de>
To: Lee Jones <lee.jones@linaro.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: axp20x: Add AXP288 volatile registers.
Date: Fri, 13 Jan 2017 16:54:28 +0100	[thread overview]
Message-ID: <941689ad-746c-99fa-a8c5-e98ef769d1c9@c-mauderer.de> (raw)
In-Reply-To: <20170113140156.GE6864@dell>

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 <oss@c-mauderer.de>
>> ---
>>  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 = {
> 

  reply	other threads:[~2017-01-13 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 19:49 [PATCH] mfd: axp20x: Add AXP288 volatile registers Christian Mauderer
2017-01-13 14:01 ` Lee Jones
2017-01-13 15:54   ` Christian Mauderer [this message]
2017-01-17 14:58   ` Lee Jones
2017-01-17 19:46     ` Christian Mauderer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=941689ad-746c-99fa-a8c5-e98ef769d1c9@c-mauderer.de \
    --to=oss@c-mauderer.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).