diff options
| author | Nicholas Troast <ntroast@codeaurora.org> | 2016-09-22 11:41:33 -0700 |
|---|---|---|
| committer | Subbaraman Narayanamurthy <subbaram@codeaurora.org> | 2016-09-30 12:27:31 -0700 |
| commit | 4dcc8dbd38f82c1a4a498961460089dbd9425652 (patch) | |
| tree | b0211aa44f6a62ff7f85e3038af6c69b7d36dd4a | |
| parent | 4f7f110863b074709a52d8b364f88f927a2bd019 (diff) | |
smb-lib: notify userspace upon usb plugin interrupt
Currently userspace will be notified whenever the Type-C changed
interrupt fires. The charging status reflects whether or not the charger
has a valid input power source. The valid input power source status
follows vbus and not the Type-C changed logic, so in some cases the
charging status may not yet be updated when the userpace is notified
that the USB power supply has changed.
Send a USB power supply changed event when both the Type-C changed
interrupt fires, and the USB plugin interrupt fires.
Change-Id: I50cdd8c706b10f08dc7f322ea02358f3dbce521e
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
| -rw-r--r-- | drivers/power/qcom-charger/smb-lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/qcom-charger/smb-lib.c b/drivers/power/qcom-charger/smb-lib.c index ed24e12e313d..e0c961314398 100644 --- a/drivers/power/qcom-charger/smb-lib.c +++ b/drivers/power/qcom-charger/smb-lib.c @@ -1768,6 +1768,7 @@ irqreturn_t smblib_handle_usb_plugin(int irq, void *data) } skip_dpdm_float: + power_supply_changed(chg->usb_psy); smblib_dbg(chg, PR_INTERRUPT, "IRQ: %s %s\n", irq_data->name, chg->vbus_present ? "attached" : "detached"); return IRQ_HANDLED; |
