usb: common: of_usb_get_dr_mode to usb_get_dr_mode
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
committed by
Felipe Balbi
parent
666472733b
commit
06e7114f0d
@@ -12,16 +12,10 @@
|
||||
#include <linux/usb/phy.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_OF)
|
||||
enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
|
||||
bool of_usb_host_tpl_support(struct device_node *np);
|
||||
int of_usb_update_otg_caps(struct device_node *np,
|
||||
struct usb_otg_caps *otg_caps);
|
||||
#else
|
||||
static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
|
||||
{
|
||||
return USB_DR_MODE_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline bool of_usb_host_tpl_support(struct device_node *np)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -119,4 +119,13 @@ enum usb_dr_mode {
|
||||
USB_DR_MODE_OTG,
|
||||
};
|
||||
|
||||
/**
|
||||
* usb_get_dr_mode - Get dual role mode for given device
|
||||
* @dev: Pointer to the given device
|
||||
*
|
||||
* The function gets phy interface string from property 'dr_mode',
|
||||
* and returns the correspondig enum usb_dr_mode
|
||||
*/
|
||||
extern enum usb_dr_mode usb_get_dr_mode(struct device *dev);
|
||||
|
||||
#endif /* __LINUX_USB_OTG_H */
|
||||
|
||||
Reference in New Issue
Block a user