Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756471AbeAIMyU (ORCPT + 1 other); Tue, 9 Jan 2018 07:54:20 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37983 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbeAIMyR (ORCPT ); Tue, 9 Jan 2018 07:54:17 -0500 X-Google-Smtp-Source: ACJfBovMAcssV2Zc9s82XT4BZShntMbYwxOv8pLkHsECJFL+NakgUQqaz8znP9p1cHJMUkLKZtgGs0uQ8E7fv1Y4u4E= MIME-Version: 1.0 In-Reply-To: References: From: Julian Calaby Date: Tue, 9 Jan 2018 23:53:55 +1100 Message-ID: Subject: Re: [linux-sunxi] [PATCH v2 13/16] power: supply: axp20x_battery: add support for AXP813 To: quentin.schulz@free-electrons.com Cc: jic23@kernel.org, knaack.h@gmx.de, Lars-Peter Clausen , pmeerw@pmeerw.net, Rob Herring , Mark Rutland , Chen-Yu Tsai , sre@kernel.org, Russell King , Maxime Ripard , Lee Jones , linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, devicetree , "linux-kernel@vger.kernel.org" , "Mailing List, Arm" , thomas.petazzoni@free-electrons.com, linux-sunxi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Quentin, On Tue, Jan 9, 2018 at 8:33 PM, Quentin Schulz wrote: > The X-Powers AXP813 PMIC has got some slight differences from > AXP20X/AXP22X PMICs: > - the maximum voltage supplied by the PMIC is 4.35 instead of 4.36/4.24 > for AXP20X/AXP22X, > - the constant charge current formula is different, > > It also has a bit to tell whether the battery percentage returned by the > PMIC is valid. > > Signed-off-by: Quentin Schulz > --- > drivers/power/supply/axp20x_battery.c | 42 ++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+) > > diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c > index d73c78f..dad72a5 100644 > --- a/drivers/power/supply/axp20x_battery.c > +++ b/drivers/power/supply/axp20x_battery.c > @@ -46,6 +46,8 @@ > #define AXP20X_CHRG_CTRL1_TGT_4_2V (2 << 5) > #define AXP20X_CHRG_CTRL1_TGT_4_36V (3 << 5) > > +#define AXP813_CHRG_CTRL1_TGT_4_35V (3 << 5) > + > #define AXP22X_CHRG_CTRL1_TGT_4_22V (1 << 5) > #define AXP22X_CHRG_CTRL1_TGT_4_24V (3 << 5) Should these be "alphabetical", i.e. AXP20X, AXP22X, AXP813? Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/