usb: phy: move bulk of otg/otg.c to phy/phy.c
[deliverable/linux.git] / drivers / usb / otg / otg.c
CommitLineData
3cb22d65
TL
1/*
2 * otg.c -- USB OTG utility code
3 *
4 * Copyright (C) 2004 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
f940fcd8 11#include <linux/export.h>
3cb22d65
TL
12#include <linux/usb/otg.h>
13
3dacdf11
AG
14const char *otg_state_string(enum usb_otg_state state)
15{
16 switch (state) {
17 case OTG_STATE_A_IDLE:
18 return "a_idle";
19 case OTG_STATE_A_WAIT_VRISE:
20 return "a_wait_vrise";
21 case OTG_STATE_A_WAIT_BCON:
22 return "a_wait_bcon";
23 case OTG_STATE_A_HOST:
24 return "a_host";
25 case OTG_STATE_A_SUSPEND:
26 return "a_suspend";
27 case OTG_STATE_A_PERIPHERAL:
28 return "a_peripheral";
29 case OTG_STATE_A_WAIT_VFALL:
30 return "a_wait_vfall";
31 case OTG_STATE_A_VBUS_ERR:
32 return "a_vbus_err";
33 case OTG_STATE_B_IDLE:
34 return "b_idle";
35 case OTG_STATE_B_SRP_INIT:
36 return "b_srp_init";
37 case OTG_STATE_B_PERIPHERAL:
38 return "b_peripheral";
39 case OTG_STATE_B_WAIT_ACON:
40 return "b_wait_acon";
41 case OTG_STATE_B_HOST:
42 return "b_host";
43 default:
44 return "UNDEFINED";
45 }
46}
47EXPORT_SYMBOL(otg_state_string);
This page took 0.391061 seconds and 5 git commands to generate.