Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325935
b: refs/heads/master
c: c84d364
h: refs/heads/master
i:
  325933: d3518b8
  325931: 0637eb7
  325927: 5fd3e38
  325919: 3073393
v: v3
  • Loading branch information
Felipe Balbi committed Aug 3, 2012
1 parent 6756c50 commit 30dcb10
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78c289f8769aaefcc52d26ca53c8b2ee545fb332
refs/heads/master: c84d364f8178d2bc12827836bf58eb45598262a4
7 changes: 6 additions & 1 deletion trunk/drivers/usb/otg/nop-usb-xceiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ static int nop_set_host(struct usb_otg *otg, struct usb_bus *host)

static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev)
{
struct nop_usb_xceiv_platform_data *pdata = pdev->dev.platform_data;
struct nop_usb_xceiv *nop;
enum usb_phy_type type = USB_PHY_TYPE_USB2;
int err;

nop = kzalloc(sizeof *nop, GFP_KERNEL);
Expand All @@ -108,6 +110,9 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev)
return -ENOMEM;
}

if (pdata)
type = pdata->type;

nop->dev = &pdev->dev;
nop->phy.dev = nop->dev;
nop->phy.label = "nop-xceiv";
Expand All @@ -118,7 +123,7 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev)
nop->phy.otg->set_host = nop_set_host;
nop->phy.otg->set_peripheral = nop_set_peripheral;

err = usb_add_phy(&nop->phy, USB_PHY_TYPE_USB2);
err = usb_add_phy(&nop->phy, type);
if (err) {
dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
err);
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/usb/nop-usb-xceiv.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef __LINUX_USB_NOP_XCEIV_H
#define __LINUX_USB_NOP_XCEIV_H

#include <linux/usb/otg.h>

struct nop_usb_xceiv_platform_data {
enum usb_phy_type type;
};

#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
/* sometimes transceivers are accessed only through e.g. ULPI */
extern void usb_nop_xceiv_register(void);
Expand Down

0 comments on commit 30dcb10

Please sign in to comment.