diff options
Diffstat (limited to 'drivers/usb')
34 files changed, 117 insertions, 117 deletions
diff --git a/drivers/usb/gadget/ci13xxx_udc.h b/drivers/usb/gadget/ci13xxx_udc.h index f4871e1fac59..0d31af56c989 100644 --- a/drivers/usb/gadget/ci13xxx_udc.h +++ b/drivers/usb/gadget/ci13xxx_udc.h | |||
@@ -136,7 +136,7 @@ struct ci13xxx { | |||
136 | struct usb_gadget_driver *driver; /* 3rd party gadget driver */ | 136 | struct usb_gadget_driver *driver; /* 3rd party gadget driver */ |
137 | struct ci13xxx_udc_driver *udc_driver; /* device controller driver */ | 137 | struct ci13xxx_udc_driver *udc_driver; /* device controller driver */ |
138 | int vbus_active; /* is VBUS active */ | 138 | int vbus_active; /* is VBUS active */ |
139 | struct otg_transceiver *transceiver; /* Transceiver struct */ | 139 | struct usb_phy *transceiver; /* Transceiver struct */ |
140 | }; | 140 | }; |
141 | 141 | ||
142 | /****************************************************************************** | 142 | /****************************************************************************** |
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h index f781f5dec417..e651469fd39b 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.h +++ b/drivers/usb/gadget/fsl_usb2_udc.h | |||
@@ -471,7 +471,7 @@ struct fsl_udc { | |||
471 | 471 | ||
472 | struct usb_ctrlrequest local_setup_buff; | 472 | struct usb_ctrlrequest local_setup_buff; |
473 | spinlock_t lock; | 473 | spinlock_t lock; |
474 | struct otg_transceiver *transceiver; | 474 | struct usb_phy *transceiver; |
475 | unsigned softconnect:1; | 475 | unsigned softconnect:1; |
476 | unsigned vbus_active:1; | 476 | unsigned vbus_active:1; |
477 | unsigned stopped:1; | 477 | unsigned stopped:1; |
diff --git a/drivers/usb/gadget/langwell_udc.h b/drivers/usb/gadget/langwell_udc.h index d6e78accaffe..8c8087abb481 100644 --- a/drivers/usb/gadget/langwell_udc.h +++ b/drivers/usb/gadget/langwell_udc.h | |||
@@ -162,7 +162,7 @@ struct langwell_udc { | |||
162 | spinlock_t lock; /* device lock */ | 162 | spinlock_t lock; /* device lock */ |
163 | struct langwell_ep *ep; | 163 | struct langwell_ep *ep; |
164 | struct usb_gadget_driver *driver; | 164 | struct usb_gadget_driver *driver; |
165 | struct otg_transceiver *transceiver; | 165 | struct usb_phy *transceiver; |
166 | u8 dev_addr; | 166 | u8 dev_addr; |
167 | u32 usb_state; | 167 | u32 usb_state; |
168 | u32 resume_state; | 168 | u32 resume_state; |
diff --git a/drivers/usb/gadget/mv_udc.h b/drivers/usb/gadget/mv_udc.h index 34aadfae723d..e2be9519abbe 100644 --- a/drivers/usb/gadget/mv_udc.h +++ b/drivers/usb/gadget/mv_udc.h | |||
@@ -217,7 +217,7 @@ struct mv_udc { | |||
217 | struct work_struct vbus_work; | 217 | struct work_struct vbus_work; |
218 | struct workqueue_struct *qwork; | 218 | struct workqueue_struct *qwork; |
219 | 219 | ||
220 | struct otg_transceiver *transceiver; | 220 | struct usb_phy *transceiver; |
221 | 221 | ||
222 | struct mv_usb_platform_data *pdata; | 222 | struct mv_usb_platform_data *pdata; |
223 | 223 | ||
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 576cd8578b45..d3529787351d 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2650,7 +2650,7 @@ static void omap_udc_release(struct device *dev) | |||
2650 | } | 2650 | } |
2651 | 2651 | ||
2652 | static int __init | 2652 | static int __init |
2653 | omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv) | 2653 | omap_udc_setup(struct platform_device *odev, struct usb_phy *xceiv) |
2654 | { | 2654 | { |
2655 | unsigned tmp, buf; | 2655 | unsigned tmp, buf; |
2656 | 2656 | ||
@@ -2790,7 +2790,7 @@ static int __init omap_udc_probe(struct platform_device *pdev) | |||
2790 | { | 2790 | { |
2791 | int status = -ENODEV; | 2791 | int status = -ENODEV; |
2792 | int hmc; | 2792 | int hmc; |
2793 | struct otg_transceiver *xceiv = NULL; | 2793 | struct usb_phy *xceiv = NULL; |
2794 | const char *type = NULL; | 2794 | const char *type = NULL; |
2795 | struct omap_usb_config *config = pdev->dev.platform_data; | 2795 | struct omap_usb_config *config = pdev->dev.platform_data; |
2796 | struct clk *dc_clk; | 2796 | struct clk *dc_clk; |
diff --git a/drivers/usb/gadget/omap_udc.h b/drivers/usb/gadget/omap_udc.h index 29edc51b6b22..59d3b2213cb1 100644 --- a/drivers/usb/gadget/omap_udc.h +++ b/drivers/usb/gadget/omap_udc.h | |||
@@ -164,7 +164,7 @@ struct omap_udc { | |||
164 | struct omap_ep ep[32]; | 164 | struct omap_ep ep[32]; |
165 | u16 devstat; | 165 | u16 devstat; |
166 | u16 clr_halt; | 166 | u16 clr_halt; |
167 | struct otg_transceiver *transceiver; | 167 | struct usb_phy *transceiver; |
168 | struct list_head iso; | 168 | struct list_head iso; |
169 | unsigned softconnect:1; | 169 | unsigned softconnect:1; |
170 | unsigned vbus_active:1; | 170 | unsigned vbus_active:1; |
diff --git a/drivers/usb/gadget/pxa25x_udc.h b/drivers/usb/gadget/pxa25x_udc.h index 8eaf4e43726b..893e917f048e 100644 --- a/drivers/usb/gadget/pxa25x_udc.h +++ b/drivers/usb/gadget/pxa25x_udc.h | |||
@@ -119,7 +119,7 @@ struct pxa25x_udc { | |||
119 | struct device *dev; | 119 | struct device *dev; |
120 | struct clk *clk; | 120 | struct clk *clk; |
121 | struct pxa2xx_udc_mach_info *mach; | 121 | struct pxa2xx_udc_mach_info *mach; |
122 | struct otg_transceiver *transceiver; | 122 | struct usb_phy *transceiver; |
123 | u64 dma_mask; | 123 | u64 dma_mask; |
124 | struct pxa25x_ep ep [PXA_UDC_NUM_ENDPOINTS]; | 124 | struct pxa25x_ep ep [PXA_UDC_NUM_ENDPOINTS]; |
125 | 125 | ||
diff --git a/drivers/usb/gadget/pxa27x_udc.h b/drivers/usb/gadget/pxa27x_udc.h index 7f4e8f424e80..a1d268c6f2cc 100644 --- a/drivers/usb/gadget/pxa27x_udc.h +++ b/drivers/usb/gadget/pxa27x_udc.h | |||
@@ -447,7 +447,7 @@ struct pxa_udc { | |||
447 | struct usb_gadget_driver *driver; | 447 | struct usb_gadget_driver *driver; |
448 | struct device *dev; | 448 | struct device *dev; |
449 | struct pxa2xx_udc_mach_info *mach; | 449 | struct pxa2xx_udc_mach_info *mach; |
450 | struct otg_transceiver *transceiver; | 450 | struct usb_phy *transceiver; |
451 | 451 | ||
452 | enum ep0_state ep0state; | 452 | enum ep0_state ep0state; |
453 | struct udc_stats stats; | 453 | struct udc_stats stats; |
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index df8661d266cb..dea475a61fd3 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c | |||
@@ -145,7 +145,7 @@ struct s3c_hsudc { | |||
145 | struct usb_gadget_driver *driver; | 145 | struct usb_gadget_driver *driver; |
146 | struct device *dev; | 146 | struct device *dev; |
147 | struct s3c24xx_hsudc_platdata *pd; | 147 | struct s3c24xx_hsudc_platdata *pd; |
148 | struct otg_transceiver *transceiver; | 148 | struct usb_phy *transceiver; |
149 | struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsudc_supply_names)]; | 149 | struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsudc_supply_names)]; |
150 | spinlock_t lock; | 150 | spinlock_t lock; |
151 | void __iomem *regs; | 151 | void __iomem *regs; |
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 592d5f76803e..ef7c4319c6e4 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define MSM_USB_BASE (hcd->regs) | 33 | #define MSM_USB_BASE (hcd->regs) |
34 | 34 | ||
35 | static struct otg_transceiver *otg; | 35 | static struct usb_phy *otg; |
36 | 36 | ||
37 | static int ehci_msm_reset(struct usb_hcd *hcd) | 37 | static int ehci_msm_reset(struct usb_hcd *hcd) |
38 | { | 38 | { |
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c index 52a604fb9321..39ca79e008d9 100644 --- a/drivers/usb/host/ehci-mv.c +++ b/drivers/usb/host/ehci-mv.c | |||
@@ -28,7 +28,7 @@ struct ehci_hcd_mv { | |||
28 | void __iomem *cap_regs; | 28 | void __iomem *cap_regs; |
29 | void __iomem *op_regs; | 29 | void __iomem *op_regs; |
30 | 30 | ||
31 | struct otg_transceiver *otg; | 31 | struct usb_phy *otg; |
32 | 32 | ||
33 | struct mv_usb_platform_data *pdata; | 33 | struct mv_usb_platform_data *pdata; |
34 | 34 | ||
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index dbc7fe8ca9e7..2e157144dcf6 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -35,7 +35,7 @@ struct tegra_ehci_hcd { | |||
35 | struct tegra_usb_phy *phy; | 35 | struct tegra_usb_phy *phy; |
36 | struct clk *clk; | 36 | struct clk *clk; |
37 | struct clk *emc_clk; | 37 | struct clk *emc_clk; |
38 | struct otg_transceiver *transceiver; | 38 | struct usb_phy *transceiver; |
39 | int host_resumed; | 39 | int host_resumed; |
40 | int bus_suspended; | 40 | int bus_suspended; |
41 | int port_resuming; | 41 | int port_resuming; |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 0a5fda73b3f2..8f9acbc96fde 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -176,7 +176,7 @@ struct ehci_hcd { /* one per controller */ | |||
176 | /* | 176 | /* |
177 | * OTG controllers and transceivers need software interaction | 177 | * OTG controllers and transceivers need software interaction |
178 | */ | 178 | */ |
179 | struct otg_transceiver *transceiver; | 179 | struct usb_phy *transceiver; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | /* convert between an HCD pointer and the corresponding EHCI_HCD */ | 182 | /* convert between an HCD pointer and the corresponding EHCI_HCD */ |
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 8ff6f7ea96fd..1b19aea25a2b 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h | |||
@@ -376,7 +376,7 @@ struct ohci_hcd { | |||
376 | * OTG controllers and transceivers need software interaction; | 376 | * OTG controllers and transceivers need software interaction; |
377 | * other external transceivers should be software-transparent | 377 | * other external transceivers should be software-transparent |
378 | */ | 378 | */ |
379 | struct otg_transceiver *transceiver; | 379 | struct usb_phy *transceiver; |
380 | void (*start_hnp)(struct ohci_hcd *ohci); | 380 | void (*start_hnp)(struct ohci_hcd *ohci); |
381 | 381 | ||
382 | /* | 382 | /* |
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 5e7cfba5b079..fc8e9edbcb82 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -317,7 +317,7 @@ static void bfin_musb_set_vbus(struct musb *musb, int is_on) | |||
317 | musb_readb(musb->mregs, MUSB_DEVCTL)); | 317 | musb_readb(musb->mregs, MUSB_DEVCTL)); |
318 | } | 318 | } |
319 | 319 | ||
320 | static int bfin_musb_set_power(struct otg_transceiver *x, unsigned mA) | 320 | static int bfin_musb_set_power(struct usb_phy *x, unsigned mA) |
321 | { | 321 | { |
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 3d11cf64ebd1..7b7ecf6c65b7 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -131,7 +131,7 @@ static inline struct musb *dev_to_musb(struct device *dev) | |||
131 | /*-------------------------------------------------------------------------*/ | 131 | /*-------------------------------------------------------------------------*/ |
132 | 132 | ||
133 | #ifndef CONFIG_BLACKFIN | 133 | #ifndef CONFIG_BLACKFIN |
134 | static int musb_ulpi_read(struct otg_transceiver *otg, u32 offset) | 134 | static int musb_ulpi_read(struct usb_phy *otg, u32 offset) |
135 | { | 135 | { |
136 | void __iomem *addr = otg->io_priv; | 136 | void __iomem *addr = otg->io_priv; |
137 | int i = 0; | 137 | int i = 0; |
@@ -165,7 +165,7 @@ static int musb_ulpi_read(struct otg_transceiver *otg, u32 offset) | |||
165 | return musb_readb(addr, MUSB_ULPI_REG_DATA); | 165 | return musb_readb(addr, MUSB_ULPI_REG_DATA); |
166 | } | 166 | } |
167 | 167 | ||
168 | static int musb_ulpi_write(struct otg_transceiver *otg, | 168 | static int musb_ulpi_write(struct usb_phy *otg, |
169 | u32 offset, u32 data) | 169 | u32 offset, u32 data) |
170 | { | 170 | { |
171 | void __iomem *addr = otg->io_priv; | 171 | void __iomem *addr = otg->io_priv; |
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 3d28fb8a2dc9..93de517a32a0 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -372,7 +372,7 @@ struct musb { | |||
372 | u16 int_rx; | 372 | u16 int_rx; |
373 | u16 int_tx; | 373 | u16 int_tx; |
374 | 374 | ||
375 | struct otg_transceiver *xceiv; | 375 | struct usb_phy *xceiv; |
376 | u8 xceiv_event; | 376 | u8 xceiv_event; |
377 | 377 | ||
378 | int nIrq; | 378 | int nIrq; |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 1f405616e6cd..5ce01bdb1951 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -277,7 +277,7 @@ static struct musb *the_musb; | |||
277 | * mode), or low power Default-B sessions, something else supplies power. | 277 | * mode), or low power Default-B sessions, something else supplies power. |
278 | * Caller must take care of locking. | 278 | * Caller must take care of locking. |
279 | */ | 279 | */ |
280 | static int tusb_draw_power(struct otg_transceiver *x, unsigned mA) | 280 | static int tusb_draw_power(struct usb_phy *x, unsigned mA) |
281 | { | 281 | { |
282 | struct musb *musb = the_musb; | 282 | struct musb *musb = the_musb; |
283 | void __iomem *tbase = musb->ctrl_base; | 283 | void __iomem *tbase = musb->ctrl_base; |
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index 76d629345418..b353b393448a 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig | |||
@@ -23,7 +23,7 @@ config USB_GPIO_VBUS | |||
23 | select USB_OTG_UTILS | 23 | select USB_OTG_UTILS |
24 | help | 24 | help |
25 | Provides simple GPIO VBUS sensing for controllers with an | 25 | Provides simple GPIO VBUS sensing for controllers with an |
26 | internal transceiver via the otg_transceiver interface, and | 26 | internal transceiver via the usb_phy interface, and |
27 | optionally control of a D+ pullup GPIO as well as a VBUS | 27 | optionally control of a D+ pullup GPIO as well as a VBUS |
28 | current limit regulator. | 28 | current limit regulator. |
29 | 29 | ||
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c index 74fe6e62e0f7..5f06dda7db61 100644 --- a/drivers/usb/otg/ab8500-usb.c +++ b/drivers/usb/otg/ab8500-usb.c | |||
@@ -68,7 +68,7 @@ enum ab8500_usb_link_status { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | struct ab8500_usb { | 70 | struct ab8500_usb { |
71 | struct otg_transceiver otg; | 71 | struct usb_phy otg; |
72 | struct device *dev; | 72 | struct device *dev; |
73 | int irq_num_id_rise; | 73 | int irq_num_id_rise; |
74 | int irq_num_id_fall; | 74 | int irq_num_id_fall; |
@@ -82,7 +82,7 @@ struct ab8500_usb { | |||
82 | int rev; | 82 | int rev; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static inline struct ab8500_usb *xceiv_to_ab(struct otg_transceiver *x) | 85 | static inline struct ab8500_usb *xceiv_to_ab(struct usb_phy *x) |
86 | { | 86 | { |
87 | return container_of(x, struct ab8500_usb, otg); | 87 | return container_of(x, struct ab8500_usb, otg); |
88 | } | 88 | } |
@@ -269,7 +269,7 @@ static void ab8500_usb_phy_disable_work(struct work_struct *work) | |||
269 | ab8500_usb_peri_phy_dis(ab); | 269 | ab8500_usb_peri_phy_dis(ab); |
270 | } | 270 | } |
271 | 271 | ||
272 | static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA) | 272 | static int ab8500_usb_set_power(struct usb_phy *otg, unsigned mA) |
273 | { | 273 | { |
274 | struct ab8500_usb *ab; | 274 | struct ab8500_usb *ab; |
275 | 275 | ||
@@ -290,13 +290,13 @@ static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA) | |||
290 | * ab->vbus_draw. | 290 | * ab->vbus_draw. |
291 | */ | 291 | */ |
292 | 292 | ||
293 | static int ab8500_usb_set_suspend(struct otg_transceiver *x, int suspend) | 293 | static int ab8500_usb_set_suspend(struct usb_phy *x, int suspend) |
294 | { | 294 | { |
295 | /* TODO */ | 295 | /* TODO */ |
296 | return 0; | 296 | return 0; |
297 | } | 297 | } |
298 | 298 | ||
299 | static int ab8500_usb_set_peripheral(struct otg_transceiver *otg, | 299 | static int ab8500_usb_set_peripheral(struct usb_phy *otg, |
300 | struct usb_gadget *gadget) | 300 | struct usb_gadget *gadget) |
301 | { | 301 | { |
302 | struct ab8500_usb *ab; | 302 | struct ab8500_usb *ab; |
@@ -329,7 +329,7 @@ static int ab8500_usb_set_peripheral(struct otg_transceiver *otg, | |||
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static int ab8500_usb_set_host(struct otg_transceiver *otg, | 332 | static int ab8500_usb_set_host(struct usb_phy *otg, |
333 | struct usb_bus *host) | 333 | struct usb_bus *host) |
334 | { | 334 | { |
335 | struct ab8500_usb *ab; | 335 | struct ab8500_usb *ab; |
diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index a190850d2d3b..66db2a117444 100644 --- a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c | |||
@@ -452,7 +452,7 @@ void otg_reset_controller(void) | |||
452 | /* Call suspend/resume routines in host driver */ | 452 | /* Call suspend/resume routines in host driver */ |
453 | int fsl_otg_start_host(struct otg_fsm *fsm, int on) | 453 | int fsl_otg_start_host(struct otg_fsm *fsm, int on) |
454 | { | 454 | { |
455 | struct otg_transceiver *xceiv = fsm->transceiver; | 455 | struct usb_phy *xceiv = fsm->transceiver; |
456 | struct device *dev; | 456 | struct device *dev; |
457 | struct fsl_otg *otg_dev = container_of(xceiv, struct fsl_otg, otg); | 457 | struct fsl_otg *otg_dev = container_of(xceiv, struct fsl_otg, otg); |
458 | u32 retval = 0; | 458 | u32 retval = 0; |
@@ -518,7 +518,7 @@ end: | |||
518 | */ | 518 | */ |
519 | int fsl_otg_start_gadget(struct otg_fsm *fsm, int on) | 519 | int fsl_otg_start_gadget(struct otg_fsm *fsm, int on) |
520 | { | 520 | { |
521 | struct otg_transceiver *xceiv = fsm->transceiver; | 521 | struct usb_phy *xceiv = fsm->transceiver; |
522 | struct device *dev; | 522 | struct device *dev; |
523 | 523 | ||
524 | if (!xceiv->gadget || !xceiv->gadget->dev.parent) | 524 | if (!xceiv->gadget || !xceiv->gadget->dev.parent) |
@@ -542,7 +542,7 @@ int fsl_otg_start_gadget(struct otg_fsm *fsm, int on) | |||
542 | * Called by initialization code of host driver. Register host controller | 542 | * Called by initialization code of host driver. Register host controller |
543 | * to the OTG. Suspend host for OTG role detection. | 543 | * to the OTG. Suspend host for OTG role detection. |
544 | */ | 544 | */ |
545 | static int fsl_otg_set_host(struct otg_transceiver *otg_p, struct usb_bus *host) | 545 | static int fsl_otg_set_host(struct usb_phy *otg_p, struct usb_bus *host) |
546 | { | 546 | { |
547 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); | 547 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); |
548 | 548 | ||
@@ -587,7 +587,7 @@ static int fsl_otg_set_host(struct otg_transceiver *otg_p, struct usb_bus *host) | |||
587 | } | 587 | } |
588 | 588 | ||
589 | /* Called by initialization code of udc. Register udc to OTG. */ | 589 | /* Called by initialization code of udc. Register udc to OTG. */ |
590 | static int fsl_otg_set_peripheral(struct otg_transceiver *otg_p, | 590 | static int fsl_otg_set_peripheral(struct usb_phy *otg_p, |
591 | struct usb_gadget *gadget) | 591 | struct usb_gadget *gadget) |
592 | { | 592 | { |
593 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); | 593 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); |
@@ -625,7 +625,7 @@ static int fsl_otg_set_peripheral(struct otg_transceiver *otg_p, | |||
625 | } | 625 | } |
626 | 626 | ||
627 | /* Set OTG port power, only for B-device */ | 627 | /* Set OTG port power, only for B-device */ |
628 | static int fsl_otg_set_power(struct otg_transceiver *otg_p, unsigned mA) | 628 | static int fsl_otg_set_power(struct usb_phy *otg_p, unsigned mA) |
629 | { | 629 | { |
630 | if (!fsl_otg_dev) | 630 | if (!fsl_otg_dev) |
631 | return -ENODEV; | 631 | return -ENODEV; |
@@ -658,7 +658,7 @@ static void fsl_otg_event(struct work_struct *work) | |||
658 | } | 658 | } |
659 | 659 | ||
660 | /* B-device start SRP */ | 660 | /* B-device start SRP */ |
661 | static int fsl_otg_start_srp(struct otg_transceiver *otg_p) | 661 | static int fsl_otg_start_srp(struct usb_phy *otg_p) |
662 | { | 662 | { |
663 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); | 663 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); |
664 | 664 | ||
@@ -673,7 +673,7 @@ static int fsl_otg_start_srp(struct otg_transceiver *otg_p) | |||
673 | } | 673 | } |
674 | 674 | ||
675 | /* A_host suspend will call this function to start hnp */ | 675 | /* A_host suspend will call this function to start hnp */ |
676 | static int fsl_otg_start_hnp(struct otg_transceiver *otg_p) | 676 | static int fsl_otg_start_hnp(struct usb_phy *otg_p) |
677 | { | 677 | { |
678 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); | 678 | struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg); |
679 | 679 | ||
@@ -698,7 +698,7 @@ static int fsl_otg_start_hnp(struct otg_transceiver *otg_p) | |||
698 | irqreturn_t fsl_otg_isr(int irq, void *dev_id) | 698 | irqreturn_t fsl_otg_isr(int irq, void *dev_id) |
699 | { | 699 | { |
700 | struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm; | 700 | struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm; |
701 | struct otg_transceiver *otg = &((struct fsl_otg *)dev_id)->otg; | 701 | struct usb_phy *otg = &((struct fsl_otg *)dev_id)->otg; |
702 | u32 otg_int_src, otg_sc; | 702 | u32 otg_int_src, otg_sc; |
703 | 703 | ||
704 | otg_sc = fsl_readl(&usb_dr_regs->otgsc); | 704 | otg_sc = fsl_readl(&usb_dr_regs->otgsc); |
@@ -815,7 +815,7 @@ err: | |||
815 | int usb_otg_start(struct platform_device *pdev) | 815 | int usb_otg_start(struct platform_device *pdev) |
816 | { | 816 | { |
817 | struct fsl_otg *p_otg; | 817 | struct fsl_otg *p_otg; |
818 | struct otg_transceiver *otg_trans = otg_get_transceiver(); | 818 | struct usb_phy *otg_trans = otg_get_transceiver(); |
819 | struct otg_fsm *fsm; | 819 | struct otg_fsm *fsm; |
820 | int status; | 820 | int status; |
821 | struct resource *res; | 821 | struct resource *res; |
diff --git a/drivers/usb/otg/fsl_otg.h b/drivers/usb/otg/fsl_otg.h index 3f8ef731aac9..caec254ad819 100644 --- a/drivers/usb/otg/fsl_otg.h +++ b/drivers/usb/otg/fsl_otg.h | |||
@@ -369,7 +369,7 @@ inline struct fsl_otg_timer *otg_timer_initializer | |||
369 | } | 369 | } |
370 | 370 | ||
371 | struct fsl_otg { | 371 | struct fsl_otg { |
372 | struct otg_transceiver otg; | 372 | struct usb_phy otg; |
373 | struct otg_fsm fsm; | 373 | struct otg_fsm fsm; |
374 | struct usb_dr_mmap *dr_mem_map; | 374 | struct usb_dr_mmap *dr_mem_map; |
375 | struct delayed_work otg_event; | 375 | struct delayed_work otg_event; |
diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index fb644c107ded..4e1b1384dc89 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * Needs to be loaded before the UDC driver that will use it. | 32 | * Needs to be loaded before the UDC driver that will use it. |
33 | */ | 33 | */ |
34 | struct gpio_vbus_data { | 34 | struct gpio_vbus_data { |
35 | struct otg_transceiver otg; | 35 | struct usb_phy otg; |
36 | struct device *dev; | 36 | struct device *dev; |
37 | struct regulator *vbus_draw; | 37 | struct regulator *vbus_draw; |
38 | int vbus_draw_enabled; | 38 | int vbus_draw_enabled; |
@@ -149,7 +149,7 @@ static irqreturn_t gpio_vbus_irq(int irq, void *data) | |||
149 | /* OTG transceiver interface */ | 149 | /* OTG transceiver interface */ |
150 | 150 | ||
151 | /* bind/unbind the peripheral controller */ | 151 | /* bind/unbind the peripheral controller */ |
152 | static int gpio_vbus_set_peripheral(struct otg_transceiver *otg, | 152 | static int gpio_vbus_set_peripheral(struct usb_phy *otg, |
153 | struct usb_gadget *gadget) | 153 | struct usb_gadget *gadget) |
154 | { | 154 | { |
155 | struct gpio_vbus_data *gpio_vbus; | 155 | struct gpio_vbus_data *gpio_vbus; |
@@ -189,7 +189,7 @@ static int gpio_vbus_set_peripheral(struct otg_transceiver *otg, | |||
189 | } | 189 | } |
190 | 190 | ||
191 | /* effective for B devices, ignored for A-peripheral */ | 191 | /* effective for B devices, ignored for A-peripheral */ |
192 | static int gpio_vbus_set_power(struct otg_transceiver *otg, unsigned mA) | 192 | static int gpio_vbus_set_power(struct usb_phy *otg, unsigned mA) |
193 | { | 193 | { |
194 | struct gpio_vbus_data *gpio_vbus; | 194 | struct gpio_vbus_data *gpio_vbus; |
195 | 195 | ||
@@ -201,7 +201,7 @@ static int gpio_vbus_set_power(struct otg_transceiver *otg, unsigned mA) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | /* for non-OTG B devices: set/clear transceiver suspend mode */ | 203 | /* for non-OTG B devices: set/clear transceiver suspend mode */ |
204 | static int gpio_vbus_set_suspend(struct otg_transceiver *otg, int suspend) | 204 | static int gpio_vbus_set_suspend(struct usb_phy *otg, int suspend) |
205 | { | 205 | { |
206 | struct gpio_vbus_data *gpio_vbus; | 206 | struct gpio_vbus_data *gpio_vbus; |
207 | 207 | ||
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 8c86787c2f09..1bc27948ac22 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ISP1301 USB OTG Transceiver Driver"); | |||
52 | MODULE_LICENSE("GPL"); | 52 | MODULE_LICENSE("GPL"); |
53 | 53 | ||
54 | struct isp1301 { | 54 | struct isp1301 { |
55 | struct otg_transceiver otg; | 55 | struct usb_phy otg; |
56 | struct i2c_client *client; | 56 | struct i2c_client *client; |
57 | void (*i2c_release)(struct device *dev); | 57 | void (*i2c_release)(struct device *dev); |
58 | 58 | ||
@@ -1274,7 +1274,7 @@ static int isp1301_otg_enable(struct isp1301 *isp) | |||
1274 | 1274 | ||
1275 | /* add or disable the host device+driver */ | 1275 | /* add or disable the host device+driver */ |
1276 | static int | 1276 | static int |
1277 | isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host) | 1277 | isp1301_set_host(struct usb_phy *otg, struct usb_bus *host) |
1278 | { | 1278 | { |
1279 | struct isp1301 *isp = container_of(otg, struct isp1301, otg); | 1279 | struct isp1301 *isp = container_of(otg, struct isp1301, otg); |
1280 | 1280 | ||
@@ -1330,7 +1330,7 @@ isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | static int | 1332 | static int |
1333 | isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget) | 1333 | isp1301_set_peripheral(struct usb_phy *otg, struct usb_gadget *gadget) |
1334 | { | 1334 | { |
1335 | struct isp1301 *isp = container_of(otg, struct isp1301, otg); | 1335 | struct isp1301 *isp = container_of(otg, struct isp1301, otg); |
1336 | #ifndef CONFIG_USB_OTG | 1336 | #ifndef CONFIG_USB_OTG |
@@ -1399,7 +1399,7 @@ isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget) | |||
1399 | /*-------------------------------------------------------------------------*/ | 1399 | /*-------------------------------------------------------------------------*/ |
1400 | 1400 | ||
1401 | static int | 1401 | static int |
1402 | isp1301_set_power(struct otg_transceiver *dev, unsigned mA) | 1402 | isp1301_set_power(struct usb_phy *dev, unsigned mA) |
1403 | { | 1403 | { |
1404 | if (!the_transceiver) | 1404 | if (!the_transceiver) |
1405 | return -ENODEV; | 1405 | return -ENODEV; |
@@ -1409,7 +1409,7 @@ isp1301_set_power(struct otg_transceiver *dev, unsigned mA) | |||
1409 | } | 1409 | } |
1410 | 1410 | ||
1411 | static int | 1411 | static int |
1412 | isp1301_start_srp(struct otg_transceiver *dev) | 1412 | isp1301_start_srp(struct usb_phy *dev) |
1413 | { | 1413 | { |
1414 | struct isp1301 *isp = container_of(dev, struct isp1301, otg); | 1414 | struct isp1301 *isp = container_of(dev, struct isp1301, otg); |
1415 | u32 otg_ctrl; | 1415 | u32 otg_ctrl; |
@@ -1436,7 +1436,7 @@ isp1301_start_srp(struct otg_transceiver *dev) | |||
1436 | } | 1436 | } |
1437 | 1437 | ||
1438 | static int | 1438 | static int |
1439 | isp1301_start_hnp(struct otg_transceiver *dev) | 1439 | isp1301_start_hnp(struct usb_phy *dev) |
1440 | { | 1440 | { |
1441 | #ifdef CONFIG_USB_OTG | 1441 | #ifdef CONFIG_USB_OTG |
1442 | struct isp1301 *isp = container_of(dev, struct isp1301, otg); | 1442 | struct isp1301 *isp = container_of(dev, struct isp1301, otg); |
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index b276f8fcdeba..cba4737a04f4 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c | |||
@@ -235,7 +235,7 @@ static int msm_hsusb_ldo_set_mode(int on) | |||
235 | return ret < 0 ? ret : 0; | 235 | return ret < 0 ? ret : 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | static int ulpi_read(struct otg_transceiver *otg, u32 reg) | 238 | static int ulpi_read(struct usb_phy *otg, u32 reg) |
239 | { | 239 | { |
240 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 240 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
241 | int cnt = 0; | 241 | int cnt = 0; |
@@ -260,7 +260,7 @@ static int ulpi_read(struct otg_transceiver *otg, u32 reg) | |||
260 | return ULPI_DATA_READ(readl(USB_ULPI_VIEWPORT)); | 260 | return ULPI_DATA_READ(readl(USB_ULPI_VIEWPORT)); |
261 | } | 261 | } |
262 | 262 | ||
263 | static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg) | 263 | static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg) |
264 | { | 264 | { |
265 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 265 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
266 | int cnt = 0; | 266 | int cnt = 0; |
@@ -390,7 +390,7 @@ static int msm_otg_phy_reset(struct msm_otg *motg) | |||
390 | } | 390 | } |
391 | 391 | ||
392 | #define LINK_RESET_TIMEOUT_USEC (250 * 1000) | 392 | #define LINK_RESET_TIMEOUT_USEC (250 * 1000) |
393 | static int msm_otg_reset(struct otg_transceiver *otg) | 393 | static int msm_otg_reset(struct usb_phy *otg) |
394 | { | 394 | { |
395 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 395 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
396 | struct msm_otg_platform_data *pdata = motg->pdata; | 396 | struct msm_otg_platform_data *pdata = motg->pdata; |
@@ -448,7 +448,7 @@ static int msm_otg_reset(struct otg_transceiver *otg) | |||
448 | #ifdef CONFIG_PM_SLEEP | 448 | #ifdef CONFIG_PM_SLEEP |
449 | static int msm_otg_suspend(struct msm_otg *motg) | 449 | static int msm_otg_suspend(struct msm_otg *motg) |
450 | { | 450 | { |
451 | struct otg_transceiver *otg = &motg->otg; | 451 | struct usb_phy *otg = &motg->otg; |
452 | struct usb_bus *bus = otg->host; | 452 | struct usb_bus *bus = otg->host; |
453 | struct msm_otg_platform_data *pdata = motg->pdata; | 453 | struct msm_otg_platform_data *pdata = motg->pdata; |
454 | int cnt = 0; | 454 | int cnt = 0; |
@@ -543,7 +543,7 @@ static int msm_otg_suspend(struct msm_otg *motg) | |||
543 | 543 | ||
544 | static int msm_otg_resume(struct msm_otg *motg) | 544 | static int msm_otg_resume(struct msm_otg *motg) |
545 | { | 545 | { |
546 | struct otg_transceiver *otg = &motg->otg; | 546 | struct usb_phy *otg = &motg->otg; |
547 | struct usb_bus *bus = otg->host; | 547 | struct usb_bus *bus = otg->host; |
548 | int cnt = 0; | 548 | int cnt = 0; |
549 | unsigned temp; | 549 | unsigned temp; |
@@ -627,7 +627,7 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) | |||
627 | motg->cur_power = mA; | 627 | motg->cur_power = mA; |
628 | } | 628 | } |
629 | 629 | ||
630 | static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA) | 630 | static int msm_otg_set_power(struct usb_phy *otg, unsigned mA) |
631 | { | 631 | { |
632 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 632 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
633 | 633 | ||
@@ -644,7 +644,7 @@ static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
644 | return 0; | 644 | return 0; |
645 | } | 645 | } |
646 | 646 | ||
647 | static void msm_otg_start_host(struct otg_transceiver *otg, int on) | 647 | static void msm_otg_start_host(struct usb_phy *otg, int on) |
648 | { | 648 | { |
649 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 649 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
650 | struct msm_otg_platform_data *pdata = motg->pdata; | 650 | struct msm_otg_platform_data *pdata = motg->pdata; |
@@ -683,7 +683,7 @@ static void msm_otg_start_host(struct otg_transceiver *otg, int on) | |||
683 | } | 683 | } |
684 | } | 684 | } |
685 | 685 | ||
686 | static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | 686 | static int msm_otg_set_host(struct usb_phy *otg, struct usb_bus *host) |
687 | { | 687 | { |
688 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 688 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
689 | struct usb_hcd *hcd; | 689 | struct usb_hcd *hcd; |
@@ -729,7 +729,7 @@ static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
729 | return 0; | 729 | return 0; |
730 | } | 730 | } |
731 | 731 | ||
732 | static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on) | 732 | static void msm_otg_start_peripheral(struct usb_phy *otg, int on) |
733 | { | 733 | { |
734 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 734 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
735 | struct msm_otg_platform_data *pdata = motg->pdata; | 735 | struct msm_otg_platform_data *pdata = motg->pdata; |
@@ -756,7 +756,7 @@ static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on) | |||
756 | 756 | ||
757 | } | 757 | } |
758 | 758 | ||
759 | static int msm_otg_set_peripheral(struct otg_transceiver *otg, | 759 | static int msm_otg_set_peripheral(struct usb_phy *otg, |
760 | struct usb_gadget *gadget) | 760 | struct usb_gadget *gadget) |
761 | { | 761 | { |
762 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 762 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
@@ -800,7 +800,7 @@ static int msm_otg_set_peripheral(struct otg_transceiver *otg, | |||
800 | 800 | ||
801 | static bool msm_chg_check_secondary_det(struct msm_otg *motg) | 801 | static bool msm_chg_check_secondary_det(struct msm_otg *motg) |
802 | { | 802 | { |
803 | struct otg_transceiver *otg = &motg->otg; | 803 | struct usb_phy *otg = &motg->otg; |
804 | u32 chg_det; | 804 | u32 chg_det; |
805 | bool ret = false; | 805 | bool ret = false; |
806 | 806 | ||
@@ -821,7 +821,7 @@ static bool msm_chg_check_secondary_det(struct msm_otg *motg) | |||
821 | 821 | ||
822 | static void msm_chg_enable_secondary_det(struct msm_otg *motg) | 822 | static void msm_chg_enable_secondary_det(struct msm_otg *motg) |
823 | { | 823 | { |
824 | struct otg_transceiver *otg = &motg->otg; | 824 | struct usb_phy *otg = &motg->otg; |
825 | u32 chg_det; | 825 | u32 chg_det; |
826 | 826 | ||
827 | switch (motg->pdata->phy_type) { | 827 | switch (motg->pdata->phy_type) { |
@@ -861,7 +861,7 @@ static void msm_chg_enable_secondary_det(struct msm_otg *motg) | |||
861 | 861 | ||
862 | static bool msm_chg_check_primary_det(struct msm_otg *motg) | 862 | static bool msm_chg_check_primary_det(struct msm_otg *motg) |
863 | { | 863 | { |
864 | struct otg_transceiver *otg = &motg->otg; | 864 | struct usb_phy *otg = &motg->otg; |
865 | u32 chg_det; | 865 | u32 chg_det; |
866 | bool ret = false; | 866 | bool ret = false; |
867 | 867 | ||
@@ -882,7 +882,7 @@ static bool msm_chg_check_primary_det(struct msm_otg *motg) | |||
882 | 882 | ||
883 | static void msm_chg_enable_primary_det(struct msm_otg *motg) | 883 | static void msm_chg_enable_primary_det(struct msm_otg *motg) |
884 | { | 884 | { |
885 | struct otg_transceiver *otg = &motg->otg; | 885 | struct usb_phy *otg = &motg->otg; |
886 | u32 chg_det; | 886 | u32 chg_det; |
887 | 887 | ||
888 | switch (motg->pdata->phy_type) { | 888 | switch (motg->pdata->phy_type) { |
@@ -907,7 +907,7 @@ static void msm_chg_enable_primary_det(struct msm_otg *motg) | |||
907 | 907 | ||
908 | static bool msm_chg_check_dcd(struct msm_otg *motg) | 908 | static bool msm_chg_check_dcd(struct msm_otg *motg) |
909 | { | 909 | { |
910 | struct otg_transceiver *otg = &motg->otg; | 910 | struct usb_phy *otg = &motg->otg; |
911 | u32 line_state; | 911 | u32 line_state; |
912 | bool ret = false; | 912 | bool ret = false; |
913 | 913 | ||
@@ -928,7 +928,7 @@ static bool msm_chg_check_dcd(struct msm_otg *motg) | |||
928 | 928 | ||
929 | static void msm_chg_disable_dcd(struct msm_otg *motg) | 929 | static void msm_chg_disable_dcd(struct msm_otg *motg) |
930 | { | 930 | { |
931 | struct otg_transceiver *otg = &motg->otg; | 931 | struct usb_phy *otg = &motg->otg; |
932 | u32 chg_det; | 932 | u32 chg_det; |
933 | 933 | ||
934 | switch (motg->pdata->phy_type) { | 934 | switch (motg->pdata->phy_type) { |
@@ -947,7 +947,7 @@ static void msm_chg_disable_dcd(struct msm_otg *motg) | |||
947 | 947 | ||
948 | static void msm_chg_enable_dcd(struct msm_otg *motg) | 948 | static void msm_chg_enable_dcd(struct msm_otg *motg) |
949 | { | 949 | { |
950 | struct otg_transceiver *otg = &motg->otg; | 950 | struct usb_phy *otg = &motg->otg; |
951 | u32 chg_det; | 951 | u32 chg_det; |
952 | 952 | ||
953 | switch (motg->pdata->phy_type) { | 953 | switch (motg->pdata->phy_type) { |
@@ -968,7 +968,7 @@ static void msm_chg_enable_dcd(struct msm_otg *motg) | |||
968 | 968 | ||
969 | static void msm_chg_block_on(struct msm_otg *motg) | 969 | static void msm_chg_block_on(struct msm_otg *motg) |
970 | { | 970 | { |
971 | struct otg_transceiver *otg = &motg->otg; | 971 | struct usb_phy *otg = &motg->otg; |
972 | u32 func_ctrl, chg_det; | 972 | u32 func_ctrl, chg_det; |
973 | 973 | ||
974 | /* put the controller in non-driving mode */ | 974 | /* put the controller in non-driving mode */ |
@@ -1003,7 +1003,7 @@ static void msm_chg_block_on(struct msm_otg *motg) | |||
1003 | 1003 | ||
1004 | static void msm_chg_block_off(struct msm_otg *motg) | 1004 | static void msm_chg_block_off(struct msm_otg *motg) |
1005 | { | 1005 | { |
1006 | struct otg_transceiver *otg = &motg->otg; | 1006 | struct usb_phy *otg = &motg->otg; |
1007 | u32 func_ctrl, chg_det; | 1007 | u32 func_ctrl, chg_det; |
1008 | 1008 | ||
1009 | switch (motg->pdata->phy_type) { | 1009 | switch (motg->pdata->phy_type) { |
@@ -1038,7 +1038,7 @@ static void msm_chg_block_off(struct msm_otg *motg) | |||
1038 | static void msm_chg_detect_work(struct work_struct *w) | 1038 | static void msm_chg_detect_work(struct work_struct *w) |
1039 | { | 1039 | { |
1040 | struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work); | 1040 | struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work); |
1041 | struct otg_transceiver *otg = &motg->otg; | 1041 | struct usb_phy *otg = &motg->otg; |
1042 | bool is_dcd, tmout, vout; | 1042 | bool is_dcd, tmout, vout; |
1043 | unsigned long delay; | 1043 | unsigned long delay; |
1044 | 1044 | ||
@@ -1152,7 +1152,7 @@ static void msm_otg_init_sm(struct msm_otg *motg) | |||
1152 | static void msm_otg_sm_work(struct work_struct *w) | 1152 | static void msm_otg_sm_work(struct work_struct *w) |
1153 | { | 1153 | { |
1154 | struct msm_otg *motg = container_of(w, struct msm_otg, sm_work); | 1154 | struct msm_otg *motg = container_of(w, struct msm_otg, sm_work); |
1155 | struct otg_transceiver *otg = &motg->otg; | 1155 | struct usb_phy *otg = &motg->otg; |
1156 | 1156 | ||
1157 | switch (otg->state) { | 1157 | switch (otg->state) { |
1158 | case OTG_STATE_UNDEFINED: | 1158 | case OTG_STATE_UNDEFINED: |
@@ -1243,7 +1243,7 @@ static void msm_otg_sm_work(struct work_struct *w) | |||
1243 | static irqreturn_t msm_otg_irq(int irq, void *data) | 1243 | static irqreturn_t msm_otg_irq(int irq, void *data) |
1244 | { | 1244 | { |
1245 | struct msm_otg *motg = data; | 1245 | struct msm_otg *motg = data; |
1246 | struct otg_transceiver *otg = &motg->otg; | 1246 | struct usb_phy *otg = &motg->otg; |
1247 | u32 otgsc = 0; | 1247 | u32 otgsc = 0; |
1248 | 1248 | ||
1249 | if (atomic_read(&motg->in_lpm)) { | 1249 | if (atomic_read(&motg->in_lpm)) { |
@@ -1281,7 +1281,7 @@ static irqreturn_t msm_otg_irq(int irq, void *data) | |||
1281 | static int msm_otg_mode_show(struct seq_file *s, void *unused) | 1281 | static int msm_otg_mode_show(struct seq_file *s, void *unused) |
1282 | { | 1282 | { |
1283 | struct msm_otg *motg = s->private; | 1283 | struct msm_otg *motg = s->private; |
1284 | struct otg_transceiver *otg = &motg->otg; | 1284 | struct usb_phy *otg = &motg->otg; |
1285 | 1285 | ||
1286 | switch (otg->state) { | 1286 | switch (otg->state) { |
1287 | case OTG_STATE_A_HOST: | 1287 | case OTG_STATE_A_HOST: |
@@ -1309,7 +1309,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf, | |||
1309 | struct seq_file *s = file->private_data; | 1309 | struct seq_file *s = file->private_data; |
1310 | struct msm_otg *motg = s->private; | 1310 | struct msm_otg *motg = s->private; |
1311 | char buf[16]; | 1311 | char buf[16]; |
1312 | struct otg_transceiver *otg = &motg->otg; | 1312 | struct usb_phy *otg = &motg->otg; |
1313 | int status = count; | 1313 | int status = count; |
1314 | enum usb_mode_type req_mode; | 1314 | enum usb_mode_type req_mode; |
1315 | 1315 | ||
@@ -1414,7 +1414,7 @@ static int __init msm_otg_probe(struct platform_device *pdev) | |||
1414 | int ret = 0; | 1414 | int ret = 0; |
1415 | struct resource *res; | 1415 | struct resource *res; |
1416 | struct msm_otg *motg; | 1416 | struct msm_otg *motg; |
1417 | struct otg_transceiver *otg; | 1417 | struct usb_phy *otg; |
1418 | 1418 | ||
1419 | dev_info(&pdev->dev, "msm_otg probe\n"); | 1419 | dev_info(&pdev->dev, "msm_otg probe\n"); |
1420 | if (!pdev->dev.platform_data) { | 1420 | if (!pdev->dev.platform_data) { |
@@ -1598,7 +1598,7 @@ free_motg: | |||
1598 | static int __devexit msm_otg_remove(struct platform_device *pdev) | 1598 | static int __devexit msm_otg_remove(struct platform_device *pdev) |
1599 | { | 1599 | { |
1600 | struct msm_otg *motg = platform_get_drvdata(pdev); | 1600 | struct msm_otg *motg = platform_get_drvdata(pdev); |
1601 | struct otg_transceiver *otg = &motg->otg; | 1601 | struct usb_phy *otg = &motg->otg; |
1602 | int cnt = 0; | 1602 | int cnt = 0; |
1603 | 1603 | ||
1604 | if (otg->host || otg->gadget) | 1604 | if (otg->host || otg->gadget) |
@@ -1660,7 +1660,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev) | |||
1660 | static int msm_otg_runtime_idle(struct device *dev) | 1660 | static int msm_otg_runtime_idle(struct device *dev) |
1661 | { | 1661 | { |
1662 | struct msm_otg *motg = dev_get_drvdata(dev); | 1662 | struct msm_otg *motg = dev_get_drvdata(dev); |
1663 | struct otg_transceiver *otg = &motg->otg; | 1663 | struct usb_phy *otg = &motg->otg; |
1664 | 1664 | ||
1665 | dev_dbg(dev, "OTG runtime idle\n"); | 1665 | dev_dbg(dev, "OTG runtime idle\n"); |
1666 | 1666 | ||
diff --git a/drivers/usb/otg/mv_otg.c b/drivers/usb/otg/mv_otg.c index b5fbe1452ab0..6e05d58effe1 100644 --- a/drivers/usb/otg/mv_otg.c +++ b/drivers/usb/otg/mv_otg.c | |||
@@ -55,7 +55,7 @@ static char *state_string[] = { | |||
55 | "a_vbus_err" | 55 | "a_vbus_err" |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static int mv_otg_set_vbus(struct otg_transceiver *otg, bool on) | 58 | static int mv_otg_set_vbus(struct usb_phy *otg, bool on) |
59 | { | 59 | { |
60 | struct mv_otg *mvotg = container_of(otg, struct mv_otg, otg); | 60 | struct mv_otg *mvotg = container_of(otg, struct mv_otg, otg); |
61 | if (mvotg->pdata->set_vbus == NULL) | 61 | if (mvotg->pdata->set_vbus == NULL) |
@@ -64,7 +64,7 @@ static int mv_otg_set_vbus(struct otg_transceiver *otg, bool on) | |||
64 | return mvotg->pdata->set_vbus(on); | 64 | return mvotg->pdata->set_vbus(on); |
65 | } | 65 | } |
66 | 66 | ||
67 | static int mv_otg_set_host(struct otg_transceiver *otg, | 67 | static int mv_otg_set_host(struct usb_phy *otg, |
68 | struct usb_bus *host) | 68 | struct usb_bus *host) |
69 | { | 69 | { |
70 | otg->host = host; | 70 | otg->host = host; |
@@ -72,7 +72,7 @@ static int mv_otg_set_host(struct otg_transceiver *otg, | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | static int mv_otg_set_peripheral(struct otg_transceiver *otg, | 75 | static int mv_otg_set_peripheral(struct usb_phy *otg, |
76 | struct usb_gadget *gadget) | 76 | struct usb_gadget *gadget) |
77 | { | 77 | { |
78 | otg->gadget = gadget; | 78 | otg->gadget = gadget; |
@@ -203,7 +203,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg) | |||
203 | static void mv_otg_start_host(struct mv_otg *mvotg, int on) | 203 | static void mv_otg_start_host(struct mv_otg *mvotg, int on) |
204 | { | 204 | { |
205 | #ifdef CONFIG_USB | 205 | #ifdef CONFIG_USB |
206 | struct otg_transceiver *otg = &mvotg->otg; | 206 | struct usb_phy *otg = &mvotg->otg; |
207 | struct usb_hcd *hcd; | 207 | struct usb_hcd *hcd; |
208 | 208 | ||
209 | if (!otg->host) | 209 | if (!otg->host) |
@@ -222,7 +222,7 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on) | |||
222 | 222 | ||
223 | static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on) | 223 | static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on) |
224 | { | 224 | { |
225 | struct otg_transceiver *otg = &mvotg->otg; | 225 | struct usb_phy *otg = &mvotg->otg; |
226 | 226 | ||
227 | if (!otg->gadget) | 227 | if (!otg->gadget) |
228 | return; | 228 | return; |
@@ -343,7 +343,7 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg) | |||
343 | static void mv_otg_update_state(struct mv_otg *mvotg) | 343 | static void mv_otg_update_state(struct mv_otg *mvotg) |
344 | { | 344 | { |
345 | struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; | 345 | struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; |
346 | struct otg_transceiver *otg = &mvotg->otg; | 346 | struct usb_phy *otg = &mvotg->otg; |
347 | int old_state = otg->state; | 347 | int old_state = otg->state; |
348 | 348 | ||
349 | switch (old_state) { | 349 | switch (old_state) { |
@@ -416,7 +416,7 @@ static void mv_otg_update_state(struct mv_otg *mvotg) | |||
416 | static void mv_otg_work(struct work_struct *work) | 416 | static void mv_otg_work(struct work_struct *work) |
417 | { | 417 | { |
418 | struct mv_otg *mvotg; | 418 | struct mv_otg *mvotg; |
419 | struct otg_transceiver *otg; | 419 | struct usb_phy *otg; |
420 | int old_state; | 420 | int old_state; |
421 | 421 | ||
422 | mvotg = container_of((struct delayed_work *)work, struct mv_otg, work); | 422 | mvotg = container_of((struct delayed_work *)work, struct mv_otg, work); |
diff --git a/drivers/usb/otg/mv_otg.h b/drivers/usb/otg/mv_otg.h index be6ca1437645..a74ee07a2727 100644 --- a/drivers/usb/otg/mv_otg.h +++ b/drivers/usb/otg/mv_otg.h | |||
@@ -136,7 +136,7 @@ struct mv_otg_regs { | |||
136 | }; | 136 | }; |
137 | 137 | ||
138 | struct mv_otg { | 138 | struct mv_otg { |
139 | struct otg_transceiver otg; | 139 | struct usb_phy otg; |
140 | struct mv_otg_ctrl otg_ctrl; | 140 | struct mv_otg_ctrl otg_ctrl; |
141 | 141 | ||
142 | /* base address */ | 142 | /* base address */ |
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index c1e360046435..2ab027997060 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | 34 | ||
35 | struct nop_usb_xceiv { | 35 | struct nop_usb_xceiv { |
36 | struct otg_transceiver otg; | 36 | struct usb_phy otg; |
37 | struct device *dev; | 37 | struct device *dev; |
38 | }; | 38 | }; |
39 | 39 | ||
@@ -58,17 +58,17 @@ void usb_nop_xceiv_unregister(void) | |||
58 | } | 58 | } |
59 | EXPORT_SYMBOL(usb_nop_xceiv_unregister); | 59 | EXPORT_SYMBOL(usb_nop_xceiv_unregister); |
60 | 60 | ||
61 | static inline struct nop_usb_xceiv *xceiv_to_nop(struct otg_transceiver *x) | 61 | static inline struct nop_usb_xceiv *xceiv_to_nop(struct usb_phy *x) |
62 | { | 62 | { |
63 | return container_of(x, struct nop_usb_xceiv, otg); | 63 | return container_of(x, struct nop_usb_xceiv, otg); |
64 | } | 64 | } |
65 | 65 | ||
66 | static int nop_set_suspend(struct otg_transceiver *x, int suspend) | 66 | static int nop_set_suspend(struct usb_phy *x, int suspend) |
67 | { | 67 | { |
68 | return 0; | 68 | return 0; |
69 | } | 69 | } |
70 | 70 | ||
71 | static int nop_set_peripheral(struct otg_transceiver *x, | 71 | static int nop_set_peripheral(struct usb_phy *x, |
72 | struct usb_gadget *gadget) | 72 | struct usb_gadget *gadget) |
73 | { | 73 | { |
74 | struct nop_usb_xceiv *nop; | 74 | struct nop_usb_xceiv *nop; |
@@ -88,7 +88,7 @@ static int nop_set_peripheral(struct otg_transceiver *x, | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static int nop_set_host(struct otg_transceiver *x, struct usb_bus *host) | 91 | static int nop_set_host(struct usb_phy *x, struct usb_bus *host) |
92 | { | 92 | { |
93 | struct nop_usb_xceiv *nop; | 93 | struct nop_usb_xceiv *nop; |
94 | 94 | ||
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index 307c27bc51eb..56c0f1781d8c 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/usb/otg.h> | 16 | #include <linux/usb/otg.h> |
17 | 17 | ||
18 | static struct otg_transceiver *xceiv; | 18 | static struct usb_phy *xceiv; |
19 | 19 | ||
20 | /** | 20 | /** |
21 | * otg_get_transceiver - find the (single) OTG transceiver | 21 | * otg_get_transceiver - find the (single) OTG transceiver |
@@ -26,7 +26,7 @@ static struct otg_transceiver *xceiv; | |||
26 | * | 26 | * |
27 | * For use by USB host and peripheral drivers. | 27 | * For use by USB host and peripheral drivers. |
28 | */ | 28 | */ |
29 | struct otg_transceiver *otg_get_transceiver(void) | 29 | struct usb_phy *otg_get_transceiver(void) |
30 | { | 30 | { |
31 | if (xceiv) | 31 | if (xceiv) |
32 | get_device(xceiv->dev); | 32 | get_device(xceiv->dev); |
@@ -42,7 +42,7 @@ EXPORT_SYMBOL(otg_get_transceiver); | |||
42 | * | 42 | * |
43 | * For use by USB host and peripheral drivers. | 43 | * For use by USB host and peripheral drivers. |
44 | */ | 44 | */ |
45 | void otg_put_transceiver(struct otg_transceiver *x) | 45 | void otg_put_transceiver(struct usb_phy *x) |
46 | { | 46 | { |
47 | if (x) | 47 | if (x) |
48 | put_device(x->dev); | 48 | put_device(x->dev); |
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(otg_put_transceiver); | |||
57 | * coordinate the activities of drivers for host and peripheral | 57 | * coordinate the activities of drivers for host and peripheral |
58 | * controllers, and in some cases for VBUS current regulation. | 58 | * controllers, and in some cases for VBUS current regulation. |
59 | */ | 59 | */ |
60 | int otg_set_transceiver(struct otg_transceiver *x) | 60 | int otg_set_transceiver(struct usb_phy *x) |
61 | { | 61 | { |
62 | if (xceiv && x) | 62 | if (xceiv && x) |
63 | return -EBUSY; | 63 | return -EBUSY; |
diff --git a/drivers/usb/otg/otg_fsm.h b/drivers/usb/otg/otg_fsm.h index 0cecf1d593a0..5e589ae9a199 100644 --- a/drivers/usb/otg/otg_fsm.h +++ b/drivers/usb/otg/otg_fsm.h | |||
@@ -82,7 +82,7 @@ struct otg_fsm { | |||
82 | int loc_sof; | 82 | int loc_sof; |
83 | 83 | ||
84 | struct otg_fsm_ops *ops; | 84 | struct otg_fsm_ops *ops; |
85 | struct otg_transceiver *transceiver; | 85 | struct usb_phy *transceiver; |
86 | 86 | ||
87 | /* Current usb protocol used: 0:undefine; 1:host; 2:client */ | 87 | /* Current usb protocol used: 0:undefine; 1:host; 2:client */ |
88 | int protocol; | 88 | int protocol; |
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 14f66c358629..beeecc239d18 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c | |||
@@ -144,7 +144,7 @@ | |||
144 | #define GPIO_USB_4PIN_ULPI_2430C (3 << 0) | 144 | #define GPIO_USB_4PIN_ULPI_2430C (3 << 0) |
145 | 145 | ||
146 | struct twl4030_usb { | 146 | struct twl4030_usb { |
147 | struct otg_transceiver otg; | 147 | struct usb_phy otg; |
148 | struct device *dev; | 148 | struct device *dev; |
149 | 149 | ||
150 | /* TWL4030 internal USB regulator supplies */ | 150 | /* TWL4030 internal USB regulator supplies */ |
@@ -548,7 +548,7 @@ static void twl4030_usb_phy_init(struct twl4030_usb *twl) | |||
548 | sysfs_notify(&twl->dev->kobj, NULL, "vbus"); | 548 | sysfs_notify(&twl->dev->kobj, NULL, "vbus"); |
549 | } | 549 | } |
550 | 550 | ||
551 | static int twl4030_set_suspend(struct otg_transceiver *x, int suspend) | 551 | static int twl4030_set_suspend(struct usb_phy *x, int suspend) |
552 | { | 552 | { |
553 | struct twl4030_usb *twl = xceiv_to_twl(x); | 553 | struct twl4030_usb *twl = xceiv_to_twl(x); |
554 | 554 | ||
@@ -560,7 +560,7 @@ static int twl4030_set_suspend(struct otg_transceiver *x, int suspend) | |||
560 | return 0; | 560 | return 0; |
561 | } | 561 | } |
562 | 562 | ||
563 | static int twl4030_set_peripheral(struct otg_transceiver *x, | 563 | static int twl4030_set_peripheral(struct usb_phy *x, |
564 | struct usb_gadget *gadget) | 564 | struct usb_gadget *gadget) |
565 | { | 565 | { |
566 | struct twl4030_usb *twl; | 566 | struct twl4030_usb *twl; |
@@ -576,7 +576,7 @@ static int twl4030_set_peripheral(struct otg_transceiver *x, | |||
576 | return 0; | 576 | return 0; |
577 | } | 577 | } |
578 | 578 | ||
579 | static int twl4030_set_host(struct otg_transceiver *x, struct usb_bus *host) | 579 | static int twl4030_set_host(struct usb_phy *x, struct usb_bus *host) |
580 | { | 580 | { |
581 | struct twl4030_usb *twl; | 581 | struct twl4030_usb *twl; |
582 | 582 | ||
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index ed2b26cfe814..56c4d3d50ebe 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c | |||
@@ -87,7 +87,7 @@ | |||
87 | #define VBUS_DET BIT(2) | 87 | #define VBUS_DET BIT(2) |
88 | 88 | ||
89 | struct twl6030_usb { | 89 | struct twl6030_usb { |
90 | struct otg_transceiver otg; | 90 | struct usb_phy otg; |
91 | struct device *dev; | 91 | struct device *dev; |
92 | 92 | ||
93 | /* for vbus reporting with irqs disabled */ | 93 | /* for vbus reporting with irqs disabled */ |
@@ -137,7 +137,7 @@ static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address) | |||
137 | return ret; | 137 | return ret; |
138 | } | 138 | } |
139 | 139 | ||
140 | static int twl6030_phy_init(struct otg_transceiver *x) | 140 | static int twl6030_phy_init(struct usb_phy *x) |
141 | { | 141 | { |
142 | struct twl6030_usb *twl; | 142 | struct twl6030_usb *twl; |
143 | struct device *dev; | 143 | struct device *dev; |
@@ -155,7 +155,7 @@ static int twl6030_phy_init(struct otg_transceiver *x) | |||
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
157 | 157 | ||
158 | static void twl6030_phy_shutdown(struct otg_transceiver *x) | 158 | static void twl6030_phy_shutdown(struct usb_phy *x) |
159 | { | 159 | { |
160 | struct twl6030_usb *twl; | 160 | struct twl6030_usb *twl; |
161 | struct device *dev; | 161 | struct device *dev; |
@@ -167,7 +167,7 @@ static void twl6030_phy_shutdown(struct otg_transceiver *x) | |||
167 | pdata->phy_power(twl->dev, 0, 0); | 167 | pdata->phy_power(twl->dev, 0, 0); |
168 | } | 168 | } |
169 | 169 | ||
170 | static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend) | 170 | static int twl6030_phy_suspend(struct usb_phy *x, int suspend) |
171 | { | 171 | { |
172 | struct twl6030_usb *twl = xceiv_to_twl(x); | 172 | struct twl6030_usb *twl = xceiv_to_twl(x); |
173 | struct device *dev = twl->dev; | 173 | struct device *dev = twl->dev; |
@@ -178,7 +178,7 @@ static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend) | |||
178 | return 0; | 178 | return 0; |
179 | } | 179 | } |
180 | 180 | ||
181 | static int twl6030_start_srp(struct otg_transceiver *x) | 181 | static int twl6030_start_srp(struct usb_phy *x) |
182 | { | 182 | { |
183 | struct twl6030_usb *twl = xceiv_to_twl(x); | 183 | struct twl6030_usb *twl = xceiv_to_twl(x); |
184 | 184 | ||
@@ -324,7 +324,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) | |||
324 | return IRQ_HANDLED; | 324 | return IRQ_HANDLED; |
325 | } | 325 | } |
326 | 326 | ||
327 | static int twl6030_set_peripheral(struct otg_transceiver *x, | 327 | static int twl6030_set_peripheral(struct usb_phy *x, |
328 | struct usb_gadget *gadget) | 328 | struct usb_gadget *gadget) |
329 | { | 329 | { |
330 | struct twl6030_usb *twl; | 330 | struct twl6030_usb *twl; |
@@ -340,7 +340,7 @@ static int twl6030_set_peripheral(struct otg_transceiver *x, | |||
340 | return 0; | 340 | return 0; |
341 | } | 341 | } |
342 | 342 | ||
343 | static int twl6030_enable_irq(struct otg_transceiver *x) | 343 | static int twl6030_enable_irq(struct usb_phy *x) |
344 | { | 344 | { |
345 | struct twl6030_usb *twl = xceiv_to_twl(x); | 345 | struct twl6030_usb *twl = xceiv_to_twl(x); |
346 | 346 | ||
@@ -376,7 +376,7 @@ static void otg_set_vbus_work(struct work_struct *data) | |||
376 | CHARGERUSB_CTRL1); | 376 | CHARGERUSB_CTRL1); |
377 | } | 377 | } |
378 | 378 | ||
379 | static int twl6030_set_vbus(struct otg_transceiver *x, bool enabled) | 379 | static int twl6030_set_vbus(struct usb_phy *x, bool enabled) |
380 | { | 380 | { |
381 | struct twl6030_usb *twl = xceiv_to_twl(x); | 381 | struct twl6030_usb *twl = xceiv_to_twl(x); |
382 | 382 | ||
@@ -386,7 +386,7 @@ static int twl6030_set_vbus(struct otg_transceiver *x, bool enabled) | |||
386 | return 0; | 386 | return 0; |
387 | } | 387 | } |
388 | 388 | ||
389 | static int twl6030_set_host(struct otg_transceiver *x, struct usb_bus *host) | 389 | static int twl6030_set_host(struct usb_phy *x, struct usb_bus *host) |
390 | { | 390 | { |
391 | struct twl6030_usb *twl; | 391 | struct twl6030_usb *twl; |
392 | 392 | ||
diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c index 0b0466728fdc..51841ed829ab 100644 --- a/drivers/usb/otg/ulpi.c +++ b/drivers/usb/otg/ulpi.c | |||
@@ -49,7 +49,7 @@ static struct ulpi_info ulpi_ids[] = { | |||
49 | ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB331x"), | 49 | ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB331x"), |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static int ulpi_set_otg_flags(struct otg_transceiver *otg) | 52 | static int ulpi_set_otg_flags(struct usb_phy *otg) |
53 | { | 53 | { |
54 | unsigned int flags = ULPI_OTG_CTRL_DP_PULLDOWN | | 54 | unsigned int flags = ULPI_OTG_CTRL_DP_PULLDOWN | |
55 | ULPI_OTG_CTRL_DM_PULLDOWN; | 55 | ULPI_OTG_CTRL_DM_PULLDOWN; |
@@ -73,7 +73,7 @@ static int ulpi_set_otg_flags(struct otg_transceiver *otg) | |||
73 | return otg_io_write(otg, flags, ULPI_OTG_CTRL); | 73 | return otg_io_write(otg, flags, ULPI_OTG_CTRL); |
74 | } | 74 | } |
75 | 75 | ||
76 | static int ulpi_set_fc_flags(struct otg_transceiver *otg) | 76 | static int ulpi_set_fc_flags(struct usb_phy *otg) |
77 | { | 77 | { |
78 | unsigned int flags = 0; | 78 | unsigned int flags = 0; |
79 | 79 | ||
@@ -115,7 +115,7 @@ static int ulpi_set_fc_flags(struct otg_transceiver *otg) | |||
115 | return otg_io_write(otg, flags, ULPI_FUNC_CTRL); | 115 | return otg_io_write(otg, flags, ULPI_FUNC_CTRL); |
116 | } | 116 | } |
117 | 117 | ||
118 | static int ulpi_set_ic_flags(struct otg_transceiver *otg) | 118 | static int ulpi_set_ic_flags(struct usb_phy *otg) |
119 | { | 119 | { |
120 | unsigned int flags = 0; | 120 | unsigned int flags = 0; |
121 | 121 | ||
@@ -134,7 +134,7 @@ static int ulpi_set_ic_flags(struct otg_transceiver *otg) | |||
134 | return otg_io_write(otg, flags, ULPI_IFC_CTRL); | 134 | return otg_io_write(otg, flags, ULPI_IFC_CTRL); |
135 | } | 135 | } |
136 | 136 | ||
137 | static int ulpi_set_flags(struct otg_transceiver *otg) | 137 | static int ulpi_set_flags(struct usb_phy *otg) |
138 | { | 138 | { |
139 | int ret; | 139 | int ret; |
140 | 140 | ||
@@ -149,7 +149,7 @@ static int ulpi_set_flags(struct otg_transceiver *otg) | |||
149 | return ulpi_set_fc_flags(otg); | 149 | return ulpi_set_fc_flags(otg); |
150 | } | 150 | } |
151 | 151 | ||
152 | static int ulpi_check_integrity(struct otg_transceiver *otg) | 152 | static int ulpi_check_integrity(struct usb_phy *otg) |
153 | { | 153 | { |
154 | int ret, i; | 154 | int ret, i; |
155 | unsigned int val = 0x55; | 155 | unsigned int val = 0x55; |
@@ -175,7 +175,7 @@ static int ulpi_check_integrity(struct otg_transceiver *otg) | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int ulpi_init(struct otg_transceiver *otg) | 178 | static int ulpi_init(struct usb_phy *otg) |
179 | { | 179 | { |
180 | int i, vid, pid, ret; | 180 | int i, vid, pid, ret; |
181 | u32 ulpi_id = 0; | 181 | u32 ulpi_id = 0; |
@@ -206,7 +206,7 @@ static int ulpi_init(struct otg_transceiver *otg) | |||
206 | return ulpi_set_flags(otg); | 206 | return ulpi_set_flags(otg); |
207 | } | 207 | } |
208 | 208 | ||
209 | static int ulpi_set_host(struct otg_transceiver *otg, struct usb_bus *host) | 209 | static int ulpi_set_host(struct usb_phy *otg, struct usb_bus *host) |
210 | { | 210 | { |
211 | unsigned int flags = otg_io_read(otg, ULPI_IFC_CTRL); | 211 | unsigned int flags = otg_io_read(otg, ULPI_IFC_CTRL); |
212 | 212 | ||
@@ -231,7 +231,7 @@ static int ulpi_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
231 | return otg_io_write(otg, flags, ULPI_IFC_CTRL); | 231 | return otg_io_write(otg, flags, ULPI_IFC_CTRL); |
232 | } | 232 | } |
233 | 233 | ||
234 | static int ulpi_set_vbus(struct otg_transceiver *otg, bool on) | 234 | static int ulpi_set_vbus(struct usb_phy *otg, bool on) |
235 | { | 235 | { |
236 | unsigned int flags = otg_io_read(otg, ULPI_OTG_CTRL); | 236 | unsigned int flags = otg_io_read(otg, ULPI_OTG_CTRL); |
237 | 237 | ||
@@ -248,11 +248,11 @@ static int ulpi_set_vbus(struct otg_transceiver *otg, bool on) | |||
248 | return otg_io_write(otg, flags, ULPI_OTG_CTRL); | 248 | return otg_io_write(otg, flags, ULPI_OTG_CTRL); |
249 | } | 249 | } |
250 | 250 | ||
251 | struct otg_transceiver * | 251 | struct usb_phy * |
252 | otg_ulpi_create(struct otg_io_access_ops *ops, | 252 | otg_ulpi_create(struct otg_io_access_ops *ops, |
253 | unsigned int flags) | 253 | unsigned int flags) |
254 | { | 254 | { |
255 | struct otg_transceiver *otg; | 255 | struct usb_phy *otg; |
256 | 256 | ||
257 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); | 257 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); |
258 | if (!otg) | 258 | if (!otg) |
diff --git a/drivers/usb/otg/ulpi_viewport.c b/drivers/usb/otg/ulpi_viewport.c index e9a37f90994f..e7b311b960bd 100644 --- a/drivers/usb/otg/ulpi_viewport.c +++ b/drivers/usb/otg/ulpi_viewport.c | |||
@@ -40,7 +40,7 @@ static int ulpi_viewport_wait(void __iomem *view, u32 mask) | |||
40 | return -ETIMEDOUT; | 40 | return -ETIMEDOUT; |
41 | } | 41 | } |
42 | 42 | ||
43 | static int ulpi_viewport_read(struct otg_transceiver *otg, u32 reg) | 43 | static int ulpi_viewport_read(struct usb_phy *otg, u32 reg) |
44 | { | 44 | { |
45 | int ret; | 45 | int ret; |
46 | void __iomem *view = otg->io_priv; | 46 | void __iomem *view = otg->io_priv; |
@@ -58,7 +58,7 @@ static int ulpi_viewport_read(struct otg_transceiver *otg, u32 reg) | |||
58 | return ULPI_VIEW_DATA_READ(readl(view)); | 58 | return ULPI_VIEW_DATA_READ(readl(view)); |
59 | } | 59 | } |
60 | 60 | ||
61 | static int ulpi_viewport_write(struct otg_transceiver *otg, u32 val, u32 reg) | 61 | static int ulpi_viewport_write(struct usb_phy *otg, u32 val, u32 reg) |
62 | { | 62 | { |
63 | int ret; | 63 | int ret; |
64 | void __iomem *view = otg->io_priv; | 64 | void __iomem *view = otg->io_priv; |