Lines Matching +full:otg +full:- +full:switch

1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* USB OTG (On The Go) defines */
28 int (*set_host)(struct usb_otg *otg, struct usb_bus *host);
31 int (*set_peripheral)(struct usb_otg *otg,
34 /* effective for A-peripheral, ignored for B devices */
35 int (*set_vbus)(struct usb_otg *otg, bool enabled);
37 /* for B devices only: start session with A-Host */
38 int (*start_srp)(struct usb_otg *otg);
40 /* start or continue HNP role switch */
41 int (*start_hnp)(struct usb_otg *otg);
46 * struct usb_otg_caps - describes the otg capabilities of the device
47 * @otg_rev: The OTG revision number the device is compliant with, it's
48 * in binary-coded decimal (i.e. 2.0 is 0200H).
64 otg_start_hnp(struct usb_otg *otg) in otg_start_hnp() argument
66 if (otg && otg->start_hnp) in otg_start_hnp()
67 return otg->start_hnp(otg); in otg_start_hnp()
69 return -ENOTSUPP; in otg_start_hnp()
74 otg_set_vbus(struct usb_otg *otg, bool enabled) in otg_set_vbus() argument
76 if (otg && otg->set_vbus) in otg_set_vbus()
77 return otg->set_vbus(otg, enabled); in otg_set_vbus()
79 return -ENOTSUPP; in otg_set_vbus()
84 otg_set_host(struct usb_otg *otg, struct usb_bus *host) in otg_set_host() argument
86 if (otg && otg->set_host) in otg_set_host()
87 return otg->set_host(otg, host); in otg_set_host()
89 return -ENOTSUPP; in otg_set_host()
96 otg_set_peripheral(struct usb_otg *otg, struct usb_gadget *periph) in otg_set_peripheral() argument
98 if (otg && otg->set_peripheral) in otg_set_peripheral()
99 return otg->set_peripheral(otg, periph); in otg_set_peripheral()
101 return -ENOTSUPP; in otg_set_peripheral()
105 otg_start_srp(struct usb_otg *otg) in otg_start_srp() argument
107 if (otg && otg->start_srp) in otg_start_srp()
108 return otg->start_srp(otg); in otg_start_srp()
110 return -ENOTSUPP; in otg_start_srp()
113 /* for OTG controller drivers (and maybe other stuff) */
124 * usb_get_dr_mode - Get dual role mode for given device