Re: [PATCH v1] chipidea: pci: register nop PHY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-11-14 at 09:09 -0600, Felipe Balbi wrote:
> On Fri, Nov 14, 2014 at 04:33:22PM +0200, Andy Shevchenko wrote:
> > Since PHY for Chipidea is optional (not all SoCs having PHY for Chipidea should
> > be programmed), we register 'nop' PHY for platforms that does not have
> 
> s/does not/do not/

Right.

> 
> > @@ -73,20 +83,27 @@ static int ci_hdrc_pci_probe(struct pci_dev *pdev,
> >  	pci_set_master(pdev);
> >  	pci_try_set_mwi(pdev);
> >  
> > +	/* register a nop PHY */
> > +	ci->phy = usb_phy_generic_register();
> > +	if (!ci->phy)
> > +		return -ENOMEM;
> > +
> >  	memset(res, 0, sizeof(res));
> > +
> >  	res[0].start	= pci_resource_start(pdev, 0);
> >  	res[0].end	= pci_resource_end(pdev, 0);
> >  	res[0].flags	= IORESOURCE_MEM;
> >  	res[1].start	= pdev->irq;
> >  	res[1].flags	= IORESOURCE_IRQ;
> >  
> > -	plat_ci = ci_hdrc_add_device(&pdev->dev, res, nres, platdata);
> > -	if (IS_ERR(plat_ci)) {
> > +	ci->ci = ci_hdrc_add_device(&pdev->dev, res, nres, platdata);
> > +	if (IS_ERR(ci->ci)) {
> >  		dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n");
> > -		return PTR_ERR(plat_ci);
> > +		usb_phy_generic_unregister(ci->phy);
> > +		return PTR_ERR(ci->ci);
> >  	}
> >  
> > -	pci_set_drvdata(pdev, plat_ci);
> > +	pci_set_drvdata(pdev, ci);
> 
> doesn't seem like this fits here. Should probably be a separate patch.

I introduce the structure to keep both platform devices in it in the
patch. I didn't get how you propose to split.

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux