Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151311
b: refs/heads/master
c: cc835e3
h: refs/heads/master
i:
  151309: 26d08d2
  151307: 2e63d28
  151303: 60ce3b0
  151295: 9379522
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Jun 16, 2009
1 parent 2ccc3d8 commit 3801eb3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 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: def6f8b978618d50daaddb92331d398da9e141f1
refs/heads/master: cc835e321a9f3fa5e083436872e198095f4805b9
25 changes: 10 additions & 15 deletions trunk/drivers/usb/otg/nop-usb-xceiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Current status:
* this is to add "nop" transceiver for all those phy which is
* autonomous such as isp1504 etc.
* This provides a "nop" transceiver for PHYs which are
* autonomous such as isp1504, isp1707, etc.
*/

#include <linux/module.h>
Expand All @@ -36,30 +36,25 @@ struct nop_usb_xceiv {
struct device *dev;
};

static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);

static struct platform_device nop_xceiv_device = {
.name = "nop_usb_xceiv",
.id = -1,
.dev = {
.dma_mask = &nop_xceiv_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = NULL,
},
};
static struct platform_device *pd;

void usb_nop_xceiv_register(void)
{
if (platform_device_register(&nop_xceiv_device) < 0) {
if (pd)
return;
pd = platform_device_register_simple("nop_usb_xceiv", -1, NULL, 0);
if (!pd) {
printk(KERN_ERR "Unable to register usb nop transceiver\n");
return;
}
}
EXPORT_SYMBOL(usb_nop_xceiv_register);

void usb_nop_xceiv_unregister(void)
{
platform_device_unregister(&nop_xceiv_device);
platform_device_unregister(pd);
}
EXPORT_SYMBOL(usb_nop_xceiv_unregister);

static inline struct nop_usb_xceiv *xceiv_to_nop(struct otg_transceiver *x)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/usb/otg.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ struct otg_transceiver {

/* for board-specific init logic */
extern int otg_set_transceiver(struct otg_transceiver *);
#ifdef CONFIG_NOP_USB_XCEIV

/* sometimes transceivers are accessed only through e.g. ULPI */
extern void usb_nop_xceiv_register(void);
extern void usb_nop_xceiv_unregister(void);
#endif


/* for usb host and peripheral controller drivers */
Expand Down

0 comments on commit 3801eb3

Please sign in to comment.