Commit 1f4d31f9 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'usb-ci-v4.15-rc1' of...

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.
parents 3a851c03 2a53e060
...@@ -9,7 +9,7 @@ config USB_CHIPIDEA ...@@ -9,7 +9,7 @@ config USB_CHIPIDEA
Dual-role switch (ID, OTG FSM, sysfs), Host-only, and Dual-role switch (ID, OTG FSM, sysfs), Host-only, and
Peripheral-only. 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 if USB_CHIPIDEA
......
...@@ -1526,6 +1526,10 @@ static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active) ...@@ -1526,6 +1526,10 @@ static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
gadget_ready = 1; gadget_ready = 1;
spin_unlock_irqrestore(&ci->lock, flags); 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 (gadget_ready) {
if (is_active) { if (is_active) {
pm_runtime_get_sync(&_gadget->dev); pm_runtime_get_sync(&_gadget->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment