summaryrefslogtreecommitdiff
path: root/drivers/phy/ti/phy-omap-usb2.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2025-10-01 18:26:47 -0300
committerGitHub <noreply@github.com>2025-10-01 18:26:47 -0300
commit925d4ff9b529f1521bfb34f01c54dfe6d6f21dc9 (patch)
tree0bbc6b039eeea3bb41830ab730b53913a88e2419 /drivers/phy/ti/phy-omap-usb2.c
parent49f4ca7b487f42e14af67a5235bd806fb93c27f8 (diff)
parent09c71a76accc2f1c288f79beb68939f897c20690 (diff)
Merge pull request #744 from angolini/lf-6.12.20-2.0.0_up_6.12.49toradex_6.12-2.0.x-imx
Lf 6.12.20 2.0.0 up 6.12.49
Diffstat (limited to 'drivers/phy/ti/phy-omap-usb2.c')
-rw-r--r--drivers/phy/ti/phy-omap-usb2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c
index 78e19b128962..0fea766a98d7 100644
--- a/drivers/phy/ti/phy-omap-usb2.c
+++ b/drivers/phy/ti/phy-omap-usb2.c
@@ -363,6 +363,13 @@ static void omap_usb2_init_errata(struct omap_usb *phy)
phy->flags |= OMAP_USB2_DISABLE_CHRG_DET;
}
+static void omap_usb2_put_device(void *_dev)
+{
+ struct device *dev = _dev;
+
+ put_device(dev);
+}
+
static int omap_usb2_probe(struct platform_device *pdev)
{
struct omap_usb *phy;
@@ -373,6 +380,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
struct device_node *control_node;
struct platform_device *control_pdev;
const struct usb_phy_data *phy_data;
+ int ret;
phy_data = device_get_match_data(&pdev->dev);
if (!phy_data)
@@ -423,6 +431,11 @@ static int omap_usb2_probe(struct platform_device *pdev)
return -EINVAL;
}
phy->control_dev = &control_pdev->dev;
+
+ ret = devm_add_action_or_reset(&pdev->dev, omap_usb2_put_device,
+ phy->control_dev);
+ if (ret)
+ return ret;
} else {
if (of_property_read_u32_index(node,
"syscon-phy-power", 1,