summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/host.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-08-14 13:44:07 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-14 23:37:19 +0400
commit3f124d233e97db96d9471d1fb346335d43d8650d (patch)
treeb2953e4a35c6b6574641c9b5ab1a3d9c07d9a651 /drivers/usb/chipidea/host.c
parentc10b4f033e7c0ddba2b7b699d01109e4de46e831 (diff)
downloadlinux-3f124d233e97db96d9471d1fb346335d43d8650d.tar.xz
usb: chipidea: add role init and destroy APIs
- The role's init will be called at probe procedure. - The role's destroy will be called at fail patch at probe and driver's removal. - The role's start/stop will be called when specific role has started. Tested-by: Marek Vasut <marex@denx.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r--drivers/usb/chipidea/host.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 8cf8d28c88d6..6f96795dd20c 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -106,6 +106,13 @@ static void host_stop(struct ci_hdrc *ci)
regulator_disable(ci->platdata->reg_vbus);
}
+
+void ci_hdrc_host_destroy(struct ci_hdrc *ci)
+{
+ if (ci->role == CI_ROLE_HOST)
+ host_stop(ci);
+}
+
int ci_hdrc_host_init(struct ci_hdrc *ci)
{
struct ci_role_driver *rdrv;