1 /* include/linux/usb/otg.h 2 * 3 * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com 4 * 5 * USB OTG (On The Go) defines 6 * 7 * SPDX-License-Identifier: GPL-2.0+ 8 */ 9 10 #ifndef __LINUX_USB_OTG_H 11 #define __LINUX_USB_OTG_H 12 13 #include <dm/ofnode.h> 14 15 enum usb_dr_mode { 16 USB_DR_MODE_UNKNOWN, 17 USB_DR_MODE_HOST, 18 USB_DR_MODE_PERIPHERAL, 19 USB_DR_MODE_OTG, 20 }; 21 22 /** 23 * usb_get_dr_mode() - Get dual role mode for given device 24 * @node: ofnode of the given device 25 * 26 * The function gets phy interface string from property 'dr_mode', 27 * and returns the correspondig enum usb_dr_mode 28 */ 29 enum usb_dr_mode usb_get_dr_mode(ofnode node); 30 31 /** 32 * usb_get_maximum_speed() - Get maximum speed for given device 33 * @node: ofnode of the given device 34 * 35 * The function gets phy interface string from property 'maximum-speed', 36 * and returns the correspondig enum usb_device_speed 37 */ 38 enum usb_device_speed usb_get_maximum_speed(ofnode node); 39 40 #endif /* __LINUX_USB_OTG_H */ 41