lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 8/9] phy: add Broadcom Kona USB2 PHY driver
On Tue, Dec 17, 2013 at 02:42:35PM -0500, Matt Porter wrote:
> Add a driver for the internal Broadcom Kona USB 2.0 PHY found
> on the BCM281xx family of SoCs.
>
> Signed-off-by: Matt Porter <mporter@linaro.org>

Kishon, are you ok with this driver ?

> +static int bcm_kona_usb2_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct bcm_kona_usb *phy;
> + struct resource *res;
> + struct phy *gphy;
> + struct phy_provider *phy_provider;
> +
> + phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
> + if (!phy)
> + return -ENOMEM;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + phy->regs = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(phy->regs))
> + return PTR_ERR(phy->regs);
> +
> + platform_set_drvdata(pdev, phy);
> +
> + phy_provider = devm_of_phy_provider_register(dev,
> + of_phy_simple_xlate);
> + if (IS_ERR(phy_provider))
> + return PTR_ERR(phy_provider);
> +
> + gphy = devm_phy_create(dev, &ops, NULL);
> + if (IS_ERR(gphy))
> + return PTR_ERR(gphy);
> +
> + /* The Kona PHY supports an 8-bit wide UTMI interface */
> + phy_set_bus_width(gphy, 8);
> +
> + phy_set_drvdata(gphy, phy);

I think this set_drvdata() should be done before registering the
provider, no ?

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-12-18 18:01    [W:0.160 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site