blob: a0ef405368b8ab2edbb62d228fafe1e00c3c4871 [file] [log] [blame]
Michael Grzeschik1c9af652013-06-13 17:59:55 +03001/*
2 * OF helpers for usb devices.
3 *
4 * This file is released under the GPLv2
5 */
6
7#ifndef __LINUX_USB_OF_H
8#define __LINUX_USB_OF_H
9
10#include <linux/usb/otg.h>
11#include <linux/usb/phy.h>
12
Peter Chen848d5b92013-06-24 09:25:59 +080013#if IS_ENABLED(CONFIG_OF)
Michael Grzeschik1c9af652013-06-13 17:59:55 +030014enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
15#else
Peter Chen848d5b92013-06-24 09:25:59 +080016static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
17{
18 return USB_DR_MODE_UNKNOWN;
19}
20#endif
21
22#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_PHY)
23enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
24#else
Michael Grzeschik1c9af652013-06-13 17:59:55 +030025static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
26{
27 return USBPHY_INTERFACE_MODE_UNKNOWN;
28}
29
Michael Grzeschik1c9af652013-06-13 17:59:55 +030030#endif
31
32#endif /* __LINUX_USB_OF_H */