diff mbox series

[2/2,v1] usb: phy: phy-gpio-vbus-usb: Add device tree probing

Message ID 20221022121838.3330528-1-linus.walleij@linaro.org (mailing list archive)
State New, archived
Headers show
Series [1/2,v1] usb: phy: phy-gpio-vbus-usb: Add devicetree bindings | expand

Commit Message

Linus Walleij Oct. 22, 2022, 12:18 p.m. UTC
Make it possible to probe the GPIO VBUS detection driver
from the device tree compatible.

Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/usb/phy/phy-gpio-vbus-usb.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c
index f13f5530746c..a9e4355a1b65 100644
--- a/drivers/usb/phy/phy-gpio-vbus-usb.c
+++ b/drivers/usb/phy/phy-gpio-vbus-usb.c
@@ -366,12 +366,20 @@  static const struct dev_pm_ops gpio_vbus_dev_pm_ops = {
 
 MODULE_ALIAS("platform:gpio-vbus");
 
+static const struct of_device_id gpio_vbus_of_match[] = {
+	{
+		.compatible = "phy-usb-vbus-gpio",
+	},
+	{},
+};
+
 static struct platform_driver gpio_vbus_driver = {
 	.driver = {
 		.name  = "gpio-vbus",
 #ifdef CONFIG_PM
 		.pm = &gpio_vbus_dev_pm_ops,
 #endif
+		.of_match_table = gpio_vbus_of_match,
 	},
 	.probe		= gpio_vbus_probe,
 	.remove		= gpio_vbus_remove,