if (flag) {
pnw->charging_cap.mA = mA;
+ pnw->charging_cap.current_event = event;
/* Notify EM the charging current update */
dev_dbg(pnw->dev, "Notify EM charging capability change\n");
spin_lock_irqsave(&pnw->charger_lock, flags);
cap->chrg_type = pnw->charging_cap.chrg_type;
cap->mA = pnw->charging_cap.mA;
+ cap->current_event = pnw->charging_cap.current_event;
spin_unlock_irqrestore(&pnw->charger_lock, flags);
dev_dbg(pnw->dev, "%s <---\n", __func__);
spin_lock_init(&pnw->charger_lock);
pnw->charging_cap.mA = CHRG_CURR_DISCONN;
pnw->charging_cap.chrg_type = CHRG_UNKNOWN;
+ pnw->charging_cap.current_event = USBCHRG_EVENT_DISCONN;
ATOMIC_INIT_NOTIFIER_HEAD(&pnw->iotg.iotg_notifier);
#define CHRG_CURR_CDP_HS 950
#define CHRG_CURR_DCP 1500
#define CHRG_CURR_ACA 1500
+ unsigned int current_event;
};
/* define event ids to notify battery driver */