aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/intel_mdf_battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/intel_mdf_battery.c')
-rw-r--r--drivers/power/intel_mdf_battery.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/power/intel_mdf_battery.c b/drivers/power/intel_mdf_battery.c
index d08cd035000..45f8e8ed4ac 100644
--- a/drivers/power/intel_mdf_battery.c
+++ b/drivers/power/intel_mdf_battery.c
@@ -492,6 +492,7 @@ static DEVICE_ATTR(emrg_charge_enable, S_IWUGO | S_IRUGO,
* msic usb properties
*/
static enum power_supply_property msic_usb_props[] = {
+ POWER_SUPPLY_PROP_TYPE,
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_PRESENT,
POWER_SUPPLY_PROP_HEALTH,
@@ -1529,6 +1530,14 @@ static int msic_batt_do_charging(struct msic_power_module_info *mbi,
mbi->usb_chrg_props.charger_type =
POWER_SUPPLY_CHARGE_TYPE_FAST;
+ if (mbi->ch_params.chrg_type == CHRG_CDP)
+ mbi->usb.type = POWER_SUPPLY_TYPE_USB_CDP;
+ else if (mbi->ch_params.chrg_type == CHRG_DCP)
+ mbi->usb.type = POWER_SUPPLY_TYPE_USB_DCP;
+ else if (mbi->ch_params.chrg_type == CHRG_ACA)
+ mbi->usb.type = POWER_SUPPLY_TYPE_USB_ACA;
+ else
+ mbi->usb.type = POWER_SUPPLY_TYPE_USB;
mutex_unlock(&mbi->usb_chrg_lock);
return 0;
}
@@ -1573,6 +1582,7 @@ static void msic_update_disconn_status(struct msic_power_module_info *mbi)
POWER_SUPPLY_CHARGE_TYPE_NONE;
mbi->usb_chrg_props.charger_present =
MSIC_USB_CHARGER_NOT_PRESENT;
+ mbi->usb.type = POWER_SUPPLY_TYPE_USB;
}
mutex_unlock(&mbi->usb_chrg_lock);