]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
9848e574 KVA |
2 | /* 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 | |
9848e574 KVA |
7 | */ |
8 | ||
9 | #ifndef __LINUX_USB_OTG_H | |
10 | #define __LINUX_USB_OTG_H | |
11 | ||
ac28e59a KY |
12 | #include <dm/ofnode.h> |
13 | ||
9848e574 KVA |
14 | enum usb_dr_mode { |
15 | USB_DR_MODE_UNKNOWN, | |
16 | USB_DR_MODE_HOST, | |
17 | USB_DR_MODE_PERIPHERAL, | |
18 | USB_DR_MODE_OTG, | |
19 | }; | |
20 | ||
c0c62d92 M |
21 | /** |
22 | * usb_get_dr_mode() - Get dual role mode for given device | |
ac28e59a | 23 | * @node: ofnode of the given device |
c0c62d92 M |
24 | * |
25 | * The function gets phy interface string from property 'dr_mode', | |
26 | * and returns the correspondig enum usb_dr_mode | |
27 | */ | |
ac28e59a | 28 | enum usb_dr_mode usb_get_dr_mode(ofnode node); |
c0c62d92 | 29 | |
6a6468f4 MK |
30 | /** |
31 | * usb_get_dr_mode() - Get dual role mode for given device | |
32 | * @node: ofnode of the given device | |
33 | * | |
34 | * The function gets phy interface string from property | |
35 | * 'role-switch-defaulr-mode', and returns the correspondig enum | |
36 | * usb_dr_mode | |
37 | */ | |
38 | enum usb_dr_mode usb_get_role_switch_default_mode(ofnode node); | |
39 | ||
59592b99 M |
40 | /** |
41 | * usb_get_maximum_speed() - Get maximum speed for given device | |
ac28e59a | 42 | * @node: ofnode of the given device |
59592b99 M |
43 | * |
44 | * The function gets phy interface string from property 'maximum-speed', | |
45 | * and returns the correspondig enum usb_device_speed | |
46 | */ | |
ac28e59a | 47 | enum usb_device_speed usb_get_maximum_speed(ofnode node); |
59592b99 | 48 | |
9848e574 | 49 | #endif /* __LINUX_USB_OTG_H */ |