summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2020-01-06 04:34:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-09 16:21:57 +0100
commitdea75ee6c98474c966bb12164cdebc1daddcd86b (patch)
treeda3e6f8ff9f0442bf6ce01ebc4b52474b4171330 /include/linux/usb
parent9df3adca0b4a96250db5826168fc022b2923272f (diff)
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. Suggested-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200106013416.9604-11-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/ulpi.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h
index c515765adab7..36c2982780ad 100644
--- a/include/linux/usb/ulpi.h
+++ b/include/linux/usb/ulpi.h
@@ -55,12 +55,23 @@
#if IS_ENABLED(CONFIG_USB_ULPI)
struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
unsigned int flags);
+
+struct usb_phy *devm_otg_ulpi_create(struct device *dev,
+ struct usb_phy_io_ops *ops,
+ unsigned int flags);
#else
static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
unsigned int flags)
{
return NULL;
}
+
+static inline struct usb_phy *devm_otg_ulpi_create(struct device *dev,
+ struct usb_phy_io_ops *ops,
+ unsigned int flags)
+{
+ return NULL;
+}
#endif
#ifdef CONFIG_USB_ULPI_VIEWPORT