mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qg: add bms voltage ocv prop node
add bms voltage ocv prop node for battery parameter test Change-Id: I2956fe82c95311d7d76f408cda8295dc93bd3784 Signed-off-by: mahj8 <mahj8@lenovo.com> Reviewed-on: https://gerrit.mot.com/1848075 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
7555c913a7
commit
cf0e6955f7
1 changed files with 5 additions and 1 deletions
|
|
@ -2718,18 +2718,22 @@ static int qg_psy_get_property(struct power_supply *psy,
|
|||
union power_supply_propval *pval)
|
||||
{
|
||||
struct qpnp_qg *chip = power_supply_get_drvdata(psy);
|
||||
int rc = 0;
|
||||
|
||||
if (psp == POWER_SUPPLY_PROP_TYPE)
|
||||
pval->intval = POWER_SUPPLY_TYPE_MAINS;
|
||||
else if (psp == POWER_SUPPLY_PROP_CHARGE_NOW)
|
||||
pval->intval = chip->cl->init_cap_uah;
|
||||
else if (psp == POWER_SUPPLY_PROP_VOLTAGE_OCV)
|
||||
rc = qg_sdam_read(SDAM_OCV_UV, &pval->intval);
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static enum power_supply_property qg_psy_props[] = {
|
||||
POWER_SUPPLY_PROP_TYPE,
|
||||
POWER_SUPPLY_PROP_CHARGE_NOW,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_OCV,
|
||||
};
|
||||
|
||||
static const struct power_supply_desc qg_psy_desc = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue