lkml.org 
[lkml]   [2013]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 5/9] usb: phy: tegra: Register as an USB PHY.
    Date
    Register the Tegra PHY device instances with the PHY subsystem so that
    the Tegra EHCI driver can locate a PHY via the standard APIs.

    Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
    ---
    drivers/usb/phy/phy-tegra-usb.c | 17 +++++++++++++++++
    1 file changed, 17 insertions(+)

    diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
    index ddcac0b..8397206 100644
    --- a/drivers/usb/phy/phy-tegra-usb.c
    +++ b/drivers/usb/phy/phy-tegra-usb.c
    @@ -931,6 +931,22 @@ static int tegra_usb_phy_probe(struct platform_device *pdev)
    tegra_phy->u_phy.set_suspend = tegra_usb_phy_suspend;

    dev_set_drvdata(&pdev->dev, tegra_phy);
    +
    + err = usb_add_phy_dev(&tegra_phy->u_phy);
    + if (err < 0) {
    + tegra_usb_phy_close(&tegra_phy->u_phy);
    + return err;
    + }
    +
    + return 0;
    +}
    +
    +static int tegra_usb_phy_remove(struct platform_device *pdev)
    +{
    + struct tegra_usb_phy *tegra_phy = platform_get_drvdata(pdev);
    +
    + usb_remove_phy(&tegra_phy->u_phy);
    +
    return 0;
    }

    @@ -942,6 +958,7 @@ MODULE_DEVICE_TABLE(of, tegra_usb_phy_id_table);

    static struct platform_driver tegra_usb_phy_driver = {
    .probe = tegra_usb_phy_probe,
    + .remove = tegra_usb_phy_remove,
    .driver = {
    .name = "tegra-phy",
    .owner = THIS_MODULE,
    --
    1.8.1.5


    \
     
     \ /
      Last update: 2013-07-15 22:41    [W:5.749 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site