mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
mmi_muc_uart: Report Charging
Check the status field on the battery power supply and then report if charging is occurring. Change-Id: Iae8a8270264a2ca7d18ea125f95be56c53042554 Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com> Reviewed-on: https://gerrit.mot.com/1235231 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
8cbbe2f26d
commit
8d1389d574
1 changed files with 4 additions and 2 deletions
|
|
@ -617,8 +617,10 @@ static int muc_uart_send_power_status(struct mod_muc_data_t *mm_data)
|
|||
pstatus.battery_max_voltage =
|
||||
pval.intval > 0 ? (uint32_t)pval.intval : 0;
|
||||
|
||||
/* TODO charging set to charger not correct. */
|
||||
pstatus.charging = pstatus.charger;
|
||||
if (!power_supply_get_property(mm_data->batt_psy,
|
||||
POWER_SUPPLY_PROP_STATUS, &pval))
|
||||
pstatus.charging =
|
||||
(pval.intval == POWER_SUPPLY_STATUS_CHARGING);
|
||||
|
||||
if (!power_supply_get_property(mm_data->usb_psy,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_MAX, &pval))
|
||||
|
|
|
|||
Loading…
Reference in a new issue