mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
wls-chg: change psy/voltage_now's value to vout value
For the file pointer of psy/wireless/voltage_now, it should be the result of VOUT value. If we use the result of vbus(from usb/voltage_now), it could not distinguish between the result from charger out and the one from wireless out. Meanwhile, the required voltage unit is 0.1mV. So we should make the result by 10. Change-Id: Ibf6e657da8bd594985c64cf2aabe004b153e78ea Reviewed-on: https://gerrit.mot.com/2278185 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
86843361fe
commit
0732d05b33
1 changed files with 2 additions and 2 deletions
|
|
@ -1202,7 +1202,7 @@ static int cps_wls_get_vout(void)
|
|||
{
|
||||
cps_reg_s *cps_reg;
|
||||
cps_reg = (cps_reg_s*)(&cps_reg_cfg[CPS_REG_ADC_VOUT]);
|
||||
return cps_wls_read_reg((int)cps_reg->reg_addr, (int)cps_reg->reg_bytes_len);
|
||||
return cps_wls_read_reg((int)cps_reg->reg_addr, (int)cps_reg->reg_bytes_len) * 10;//request unit is 0.1mV
|
||||
}
|
||||
|
||||
static int cps_wls_get_state(void)
|
||||
|
|
@ -1387,7 +1387,7 @@ static int cps_wls_chrg_get_property(struct power_supply *psy,
|
|||
val->intval = 5000000;//Have no usage, just for voltage max propety.
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_NOW:
|
||||
ret = cps_get_power_supply_prop("usb", psp, val);
|
||||
val->intval = cps_wls_get_vout();
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CURRENT_NOW:
|
||||
ret = cps_get_power_supply_prop("battery", psp, val);
|
||||
|
|
|
|||
Loading…
Reference in a new issue