Re: [PATCH 2/2] power: supply: Add Spreadtrum SC2731 charger support
From: Baolin Wang <hidden>
Date: 2018-08-31 05:59:16
Also in:
linux-pm, lkml
From: Baolin Wang <hidden>
Date: 2018-08-31 05:59:16
Also in:
linux-pm, lkml
Hi Sebastian, On 31 August 2018 at 05:27, Sebastian Reichel [off-list ref] wrote:
Hi, On Thu, Aug 30, 2018 at 11:08:59AM +0800, Baolin Wang wrote:quoted
quoted
quoted
+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.quoted
quoted
+ 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
Sure. Will look at this file. Thanks. -- Baolin Wang Best Regards