diff options
author | Greg Kroah-Hartman | 2017-10-30 09:47:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-10-30 09:47:40 +0100 |
commit | 1f4d31f9aa016b5cb8ebcc2061fb59b295d51c76 (patch) | |
tree | 37080b5e9055e103f1f646fb6262211e03488527 /drivers | |
parent | usb: atm: cxacru: mark expected switch fall-throughs (diff) | |
parent | usb: chipidea: fix trivial typo in Kconfig (diff) | |
download | kernel-qcow2-linux-1f4d31f9aa016b5cb8ebcc2061fb59b295d51c76.tar.gz kernel-qcow2-linux-1f4d31f9aa016b5cb8ebcc2061fb59b295d51c76.tar.xz kernel-qcow2-linux-1f4d31f9aa016b5cb8ebcc2061fb59b295d51c76.zip |
Merge tag 'usb-ci-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next
Peter writes:
The main change for this rc is notify USB charger present when
vbus is there using new USB charger API.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/chipidea/Kconfig | 2 | ||||
-rw-r--r-- | drivers/usb/chipidea/udc.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index 51f4157bbecf..785f0ed037f7 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig @@ -9,7 +9,7 @@ config USB_CHIPIDEA Dual-role switch (ID, OTG FSM, sysfs), Host-only, and Peripheral-only. - When compiled dynamically, the module will be called ci-hdrc.ko. + When compiled dynamically, the module will be called ci_hdrc.ko. if USB_CHIPIDEA diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index fe8a90543ea3..daffa5ed396d 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1526,6 +1526,10 @@ static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active) gadget_ready = 1; spin_unlock_irqrestore(&ci->lock, flags); + if (ci->usb_phy) + usb_phy_set_charger_state(ci->usb_phy, is_active ? + USB_CHARGER_PRESENT : USB_CHARGER_ABSENT); + if (gadget_ready) { if (is_active) { pm_runtime_get_sync(&_gadget->dev); |