mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
power: rt9426a fg's name rename to bms from battery
gerrit.mot.com/#/c/2077581/ will create /sys/class/power_supply/battery To apply for charging policy, 1.rename battery dir to bms. 2.current and voltage *1000 3.online rename to persent. Change-Id: I224d53b6afb9b59b3f7c1e450e91a1f0de2ab502 Signed-off-by: liuyc20 <liuyc20@lenovo.com> Reviewed-on: https://gerrit.mot.com/2085138 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
5b8c5bca15
commit
1affbeb16b
1 changed files with 6 additions and 6 deletions
|
|
@ -1123,12 +1123,12 @@ static int rt_fg_get_property(struct power_supply *psy,
|
|||
int rc = 0;
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_ONLINE:
|
||||
case POWER_SUPPLY_PROP_PRESENT:
|
||||
val->intval = chip->online;
|
||||
dev_info(chip->dev, "psp_online = %d\n", val->intval);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_NOW:
|
||||
val->intval = rt9426a_get_volt(chip);
|
||||
val->intval = rt9426a_get_volt(chip) * 1000;
|
||||
dev_info(chip->dev, "psp_volt_now = %d\n", val->intval);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
|
||||
|
|
@ -1146,7 +1146,7 @@ static int rt_fg_get_property(struct power_supply *psy,
|
|||
dev_info(chip->dev, "psp_charge_full_design = %d\n", val->intval);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CURRENT_NOW:
|
||||
val->intval = rt9426a_get_current(chip);
|
||||
val->intval = rt9426a_get_current(chip) * 1000;
|
||||
dev_info(chip->dev, "psp_curr_now = %d\n", val->intval);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_TEMP:
|
||||
|
|
@ -1238,7 +1238,7 @@ static int rt_fg_property_is_writeable(struct power_supply *psy, enum power_supp
|
|||
}
|
||||
|
||||
static enum power_supply_property rt_fg_props[] = {
|
||||
POWER_SUPPLY_PROP_ONLINE,
|
||||
POWER_SUPPLY_PROP_PRESENT,
|
||||
POWER_SUPPLY_PROP_CYCLE_COUNT,
|
||||
POWER_SUPPLY_PROP_CURRENT_NOW,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_NOW,
|
||||
|
|
@ -1251,8 +1251,8 @@ static enum power_supply_property rt_fg_props[] = {
|
|||
};
|
||||
|
||||
static struct power_supply_desc fg_psy_desc = {
|
||||
.name = "battery",
|
||||
.type = POWER_SUPPLY_TYPE_BATTERY,
|
||||
.name = "bms",
|
||||
.type = POWER_SUPPLY_TYPE_MAINS,
|
||||
.properties = rt_fg_props,
|
||||
.num_properties = ARRAY_SIZE(rt_fg_props),
|
||||
.get_property = rt_fg_get_property,
|
||||
|
|
|
|||
Loading…
Reference in a new issue