History

usb: ulpi: Add resource-managed variant of otg_ulpi_create()

Now drivers (like NVIDIA Tegra USB PHY for example) will be able to benefit from the resource-managed variant, making driver's code a bit cleaner.

Dmitry Osipenko committed 6 years ago

Commit dea75ee1 parent 9df3adc2 files · +50 −9Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/usb/ulpi.h+11−0
@@ -55,12 +55,23 @@ · 54 unmodified lines
55#if IS_ENABLED(CONFIG_USB_ULPI)55#if IS_ENABLED(CONFIG_USB_ULPI)
56struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,56struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
57 unsigned int flags);57 unsigned int flags);
58
59struct usb_phy *devm_otg_ulpi_create(struct device *dev,
60 struct usb_phy_io_ops *ops,
61 unsigned int flags);
58#else62#else
59static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,63static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
60 unsigned int flags)64 unsigned int flags)
61{65{
62 return NULL;66 return NULL;
63}67}
68
69static inline struct usb_phy *devm_otg_ulpi_create(struct device *dev,
70 struct usb_phy_io_ops *ops,
71 unsigned int flags)
72{
73 return NULL;
74}
64#endif75#endif
65 76
66#ifdef CONFIG_USB_ULPI_VIEWPORT77#ifdef CONFIG_USB_ULPI_VIEWPORT