Re: [PATCH 2/2] power: supply: Add Spreadtrum SC2731 charger support

From: Sebastian Reichel
Date: Thu Aug 30 2018 - 17:27:17 EST


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

Attachment: signature.asc
Description: PGP signature