diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-08 16:27:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-08 16:27:14 +0200 |
commit | 6503016ea5d3945f9af1eeac23ba99f408f3af1e (patch) | |
tree | 7b965b962ccaf761eacf9adae671797085814344 /drivers/usb/chipidea/host.c | |
parent | 8aff4eaa1de7a0ba70af8447ed08127ef0e8e45d (diff) | |
parent | 59739131e0ca06db7560f9073fff2fb83f6bc2a5 (diff) |
Merge tag 'usb-ci-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-testing
Peter writes:
- Add pinctrl support for dual-role switch at chipidea-core
- improve overcorrent handling for imx
- some small code restructure (no function affect)
* tag 'usb-ci-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb:
usb: chipidea: Fix otg event handler
usb: chipidea: Prevent unbalanced IRQ disable
doc: usb: ci-hdrc-usb2: Add pinctrl properties definition
usb: chipidea: Add dynamic pinctrl selection
usb: chipidea: imx: make MODULE_LICENCE and SPDX-identifier match
usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started
usb: chipidea: imx: do not use preprocessor conditionals for PM
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r-- | drivers/usb/chipidea/host.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 4638d9b066be..d858a82c4f44 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -13,6 +13,7 @@ #include <linux/usb/hcd.h> #include <linux/usb/chipidea.h> #include <linux/regulator/consumer.h> +#include <linux/pinctrl/consumer.h> #include "../host/ehci.h" @@ -153,6 +154,10 @@ static int host_start(struct ci_hdrc *ci) } } + if (ci->platdata->pins_host) + pinctrl_select_state(ci->platdata->pctl, + ci->platdata->pins_host); + ret = usb_add_hcd(hcd, 0, 0); if (ret) { goto disable_reg; @@ -197,6 +202,10 @@ static void host_stop(struct ci_hdrc *ci) } ci->hcd = NULL; ci->otg.host = NULL; + + if (ci->platdata->pins_host && ci->platdata->pins_default) + pinctrl_select_state(ci->platdata->pctl, + ci->platdata->pins_default); } |