183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 29848e574SKishon Vijay Abraham I /* include/linux/usb/otg.h 39848e574SKishon Vijay Abraham I * 49848e574SKishon Vijay Abraham I * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com 59848e574SKishon Vijay Abraham I * 69848e574SKishon Vijay Abraham I * USB OTG (On The Go) defines 79848e574SKishon Vijay Abraham I */ 89848e574SKishon Vijay Abraham I 99848e574SKishon Vijay Abraham I #ifndef __LINUX_USB_OTG_H 109848e574SKishon Vijay Abraham I #define __LINUX_USB_OTG_H 119848e574SKishon Vijay Abraham I 129848e574SKishon Vijay Abraham I enum usb_dr_mode { 139848e574SKishon Vijay Abraham I USB_DR_MODE_UNKNOWN, 149848e574SKishon Vijay Abraham I USB_DR_MODE_HOST, 159848e574SKishon Vijay Abraham I USB_DR_MODE_PERIPHERAL, 169848e574SKishon Vijay Abraham I USB_DR_MODE_OTG, 179848e574SKishon Vijay Abraham I }; 189848e574SKishon Vijay Abraham I 19c0c62d92SMugunthan V N /** 20c0c62d92SMugunthan V N * usb_get_dr_mode() - Get dual role mode for given device 21c0c62d92SMugunthan V N * @node: Node offset to the given device 22c0c62d92SMugunthan V N * 23c0c62d92SMugunthan V N * The function gets phy interface string from property 'dr_mode', 24c0c62d92SMugunthan V N * and returns the correspondig enum usb_dr_mode 25c0c62d92SMugunthan V N */ 26c0c62d92SMugunthan V N enum usb_dr_mode usb_get_dr_mode(int node); 27c0c62d92SMugunthan V N 28*59592b99SMugunthan V N /** 29*59592b99SMugunthan V N * usb_get_maximum_speed() - Get maximum speed for given device 30*59592b99SMugunthan V N * @node: Node offset to the given device 31*59592b99SMugunthan V N * 32*59592b99SMugunthan V N * The function gets phy interface string from property 'maximum-speed', 33*59592b99SMugunthan V N * and returns the correspondig enum usb_device_speed 34*59592b99SMugunthan V N */ 35*59592b99SMugunthan V N enum usb_device_speed usb_get_maximum_speed(int node); 36*59592b99SMugunthan V N 379848e574SKishon Vijay Abraham I #endif /* __LINUX_USB_OTG_H */ 38