blob: d2604c5cafba5f3ef03d8ec216082ea09e354284 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Kishon Vijay Abraham Ic2b77b62015-02-23 18:39:54 +05302/* include/linux/usb/otg.h
3 *
4 * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * USB OTG (On The Go) defines
Kishon Vijay Abraham Ic2b77b62015-02-23 18:39:54 +05307 */
8
9#ifndef __LINUX_USB_OTG_H
10#define __LINUX_USB_OTG_H
11
12enum usb_dr_mode {
13 USB_DR_MODE_UNKNOWN,
14 USB_DR_MODE_HOST,
15 USB_DR_MODE_PERIPHERAL,
16 USB_DR_MODE_OTG,
17};
18
Mugunthan V N1a547132016-04-12 16:01:19 +053019/**
20 * usb_get_dr_mode() - Get dual role mode for given device
21 * @node: Node offset to the given device
22 *
23 * The function gets phy interface string from property 'dr_mode',
24 * and returns the correspondig enum usb_dr_mode
25 */
26enum usb_dr_mode usb_get_dr_mode(int node);
27
Mugunthan V N58d8fbe2018-05-18 13:15:05 +020028/**
29 * usb_get_maximum_speed() - Get maximum speed for given device
30 * @node: Node offset to the given device
31 *
32 * The function gets phy interface string from property 'maximum-speed',
33 * and returns the correspondig enum usb_device_speed
34 */
35enum usb_device_speed usb_get_maximum_speed(int node);
36
Kishon Vijay Abraham Ic2b77b62015-02-23 18:39:54 +053037#endif /* __LINUX_USB_OTG_H */