lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Aug 2018 23:27:10 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Baolin Wang <baolin.wang@...aro.org>
Cc:     Krzysztof Kozlowski <krzk@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Linux PM list <linux-pm@...r.kernel.org>,
        DTML <devicetree@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, yuanjiang.yu@...soc.com,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH 2/2] power: supply: Add Spreadtrum SC2731 charger support

Hi,

On Thu, Aug 30, 2018 at 11:08:59AM +0800, Baolin Wang wrote:
> >> +static int sc2731_charger_hw_init(struct sc2731_charger_info *info)
> >> +{
> >> +       int ret;
> >> +
> >> +       /* Enable charger module */
> >> +       ret = regmap_update_bits(info->regmap, SC2731_MODULE_EN1,
> >> +                                SC2731_CHARGE_EN, SC2731_CHARGE_EN);
> >> +       if (ret)
> >> +               return ret;
> >> +
> >> +       /* Set default charge termination current to 120 mA */
> >> +       ret = regmap_update_bits(info->regmap, info->base + SC2731_CHG_CFG2,
> >> +                                SC2731_TERMINATION_CUR_MASK, 0x2);
> >
> > Looks like DeviceTree property.
> 
> OK.
> 
> >
> >> +       if (ret)
> >> +               goto error;
> >> +
> >> +       /* Set default charge termination voltage to 4.35V */
> >
> > Looks like DeviceTree property.
> 
> OK. Thanks for your comments.

I did not review this in detail, but had quick look at this.
Please make sure to derive battery specific DT values using
this:

Documentation/devicetree/bindings/power/supply/battery.txt

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ