Skip to content

Commit

Permalink
usb: otg: Rename otg_transceiver to usb_phy
Browse files Browse the repository at this point in the history
This is the first step in separating USB transceivers from
USB OTG utilities.

Includes fixes to IMX code from Sascha Hauer.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Heikki Krogerus authored and Felipe Balbi committed Feb 13, 2012
1 parent 62aa2b5 commit 8675381
Show file tree
Hide file tree
Showing 48 changed files with 190 additions and 190 deletions.
6 changes: 3 additions & 3 deletions arch/arm/mach-imx/mx31moboard-devboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int devboard_usbh1_hw_init(struct platform_device *pdev)
#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B)
#define USBH1_MODE IOMUX_TO_GPIO(MX31_PIN_NFALE)

static int devboard_isp1105_init(struct otg_transceiver *otg)
static int devboard_isp1105_init(struct usb_phy *otg)
{
int ret = gpio_request(USBH1_MODE, "usbh1-mode");
if (ret)
Expand All @@ -177,7 +177,7 @@ static int devboard_isp1105_init(struct otg_transceiver *otg)
}


static int devboard_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
static int devboard_isp1105_set_vbus(struct usb_phy *otg, bool on)
{
if (on)
gpio_set_value(USBH1_VBUSEN_B, 0);
Expand All @@ -194,7 +194,7 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = {

static int __init devboard_usbh1_init(void)
{
struct otg_transceiver *otg;
struct usb_phy *otg;
struct platform_device *pdev;

otg = kzalloc(sizeof(*otg), GFP_KERNEL);
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-imx/mx31moboard-marxbot.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static int marxbot_usbh1_hw_init(struct platform_device *pdev)
#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B)
#define USBH1_MODE IOMUX_TO_GPIO(MX31_PIN_NFALE)

static int marxbot_isp1105_init(struct otg_transceiver *otg)
static int marxbot_isp1105_init(struct usb_phy *otg)
{
int ret = gpio_request(USBH1_MODE, "usbh1-mode");
if (ret)
Expand All @@ -291,7 +291,7 @@ static int marxbot_isp1105_init(struct otg_transceiver *otg)
}


static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
static int marxbot_isp1105_set_vbus(struct usb_phy *otg, bool on)
{
if (on)
gpio_set_value(USBH1_VBUSEN_B, 0);
Expand All @@ -308,7 +308,7 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = {

static int __init marxbot_usbh1_init(void)
{
struct otg_transceiver *otg;
struct usb_phy *otg;
struct platform_device *pdev;

otg = kzalloc(sizeof(*otg), GFP_KERNEL);
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-pxa/pxa3xx-ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct pxa3xx_u2d_ulpi {
struct clk *clk;
void __iomem *mmio_base;

struct otg_transceiver *otg;
struct usb_phy *otg;
unsigned int ulpi_mode;
};

Expand Down Expand Up @@ -79,7 +79,7 @@ static int pxa310_ulpi_poll(void)
return -ETIMEDOUT;
}

static int pxa310_ulpi_read(struct otg_transceiver *otg, u32 reg)
static int pxa310_ulpi_read(struct usb_phy *otg, u32 reg)
{
int err;

Expand All @@ -98,7 +98,7 @@ static int pxa310_ulpi_read(struct otg_transceiver *otg, u32 reg)
return u2d_readl(U2DOTGUCR) & U2DOTGUCR_RDATA;
}

static int pxa310_ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg)
static int pxa310_ulpi_write(struct usb_phy *otg, u32 val, u32 reg)
{
if (pxa310_ulpi_get_phymode() != SYNCH) {
pr_warning("%s: PHY is not in SYNCH mode!\n", __func__);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-tegra/include/mach/usb_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct tegra_usb_phy {
struct clk *pad_clk;
enum tegra_usb_phy_mode mode;
void *config;
struct otg_transceiver *ulpi;
struct usb_phy *ulpi;
};

struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-mxc/include/mach/mxc_ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct mxc_usbh_platform_data {
int (*exit)(struct platform_device *pdev);

unsigned int portsc;
struct otg_transceiver *otg;
struct usb_phy *otg;
};

int mx51_initialize_usb_hw(int port, unsigned int flags);
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/plat-mxc/include/mach/ulpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define __MACH_ULPI_H

#ifdef CONFIG_USB_ULPI
struct otg_transceiver *imx_otg_ulpi_create(unsigned int flags);
struct usb_phy *imx_otg_ulpi_create(unsigned int flags);
#else
static inline struct otg_transceiver *imx_otg_ulpi_create(unsigned int flags)
static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags)
{
return NULL;
}
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static int ulpi_poll(void __iomem *view, u32 bit)
return -ETIMEDOUT;
}

static int ulpi_read(struct otg_transceiver *otg, u32 reg)
static int ulpi_read(struct usb_phy *otg, u32 reg)
{
int ret;
void __iomem *view = otg->io_priv;
Expand All @@ -84,7 +84,7 @@ static int ulpi_read(struct otg_transceiver *otg, u32 reg)
return (__raw_readl(view) >> ULPIVW_RDATA_SHIFT) & ULPIVW_RDATA_MASK;
}

static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg)
static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg)
{
int ret;
void __iomem *view = otg->io_priv;
Expand Down Expand Up @@ -112,7 +112,7 @@ struct otg_io_access_ops mxc_ulpi_access_ops = {
};
EXPORT_SYMBOL_GPL(mxc_ulpi_access_ops);

struct otg_transceiver *imx_otg_ulpi_create(unsigned int flags)
struct usb_phy *imx_otg_ulpi_create(unsigned int flags)
{
return otg_ulpi_create(&mxc_ulpi_access_ops, flags);
}
2 changes: 1 addition & 1 deletion drivers/power/isp1704_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static u16 isp170x_id[] = {
struct isp1704_charger {
struct device *dev;
struct power_supply psy;
struct otg_transceiver *otg;
struct usb_phy *otg;
struct notifier_block nb;
struct work_struct work;

Expand Down
2 changes: 1 addition & 1 deletion drivers/power/pda_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static struct timer_list polling_timer;
static int polling;

#ifdef CONFIG_USB_OTG_UTILS
static struct otg_transceiver *transceiver;
static struct usb_phy *transceiver;
static struct notifier_block otg_nb;
#endif

Expand Down
2 changes: 1 addition & 1 deletion drivers/power/twl4030_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct twl4030_bci {
struct device *dev;
struct power_supply ac;
struct power_supply usb;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
struct notifier_block otg_nb;
struct work_struct work;
int irq_chg;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/ci13xxx_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct ci13xxx {
struct usb_gadget_driver *driver; /* 3rd party gadget driver */
struct ci13xxx_udc_driver *udc_driver; /* device controller driver */
int vbus_active; /* is VBUS active */
struct otg_transceiver *transceiver; /* Transceiver struct */
struct usb_phy *transceiver; /* Transceiver struct */
};

/******************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/fsl_usb2_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ struct fsl_udc {

struct usb_ctrlrequest local_setup_buff;
spinlock_t lock;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
unsigned softconnect:1;
unsigned vbus_active:1;
unsigned stopped:1;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/langwell_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct langwell_udc {
spinlock_t lock; /* device lock */
struct langwell_ep *ep;
struct usb_gadget_driver *driver;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
u8 dev_addr;
u32 usb_state;
u32 resume_state;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/mv_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ struct mv_udc {
struct work_struct vbus_work;
struct workqueue_struct *qwork;

struct otg_transceiver *transceiver;
struct usb_phy *transceiver;

struct mv_usb_platform_data *pdata;

Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/gadget/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2650,7 +2650,7 @@ static void omap_udc_release(struct device *dev)
}

static int __init
omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv)
omap_udc_setup(struct platform_device *odev, struct usb_phy *xceiv)
{
unsigned tmp, buf;

Expand Down Expand Up @@ -2790,7 +2790,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
{
int status = -ENODEV;
int hmc;
struct otg_transceiver *xceiv = NULL;
struct usb_phy *xceiv = NULL;
const char *type = NULL;
struct omap_usb_config *config = pdev->dev.platform_data;
struct clk *dc_clk;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/omap_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ struct omap_udc {
struct omap_ep ep[32];
u16 devstat;
u16 clr_halt;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
struct list_head iso;
unsigned softconnect:1;
unsigned vbus_active:1;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/pxa25x_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct pxa25x_udc {
struct device *dev;
struct clk *clk;
struct pxa2xx_udc_mach_info *mach;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
u64 dma_mask;
struct pxa25x_ep ep [PXA_UDC_NUM_ENDPOINTS];

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/pxa27x_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ struct pxa_udc {
struct usb_gadget_driver *driver;
struct device *dev;
struct pxa2xx_udc_mach_info *mach;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;

enum ep0_state ep0state;
struct udc_stats stats;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c-hsudc.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct s3c_hsudc {
struct usb_gadget_driver *driver;
struct device *dev;
struct s3c24xx_hsudc_platdata *pd;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsudc_supply_names)];
spinlock_t lock;
void __iomem *regs;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-msm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define MSM_USB_BASE (hcd->regs)

static struct otg_transceiver *otg;
static struct usb_phy *otg;

static int ehci_msm_reset(struct usb_hcd *hcd)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct ehci_hcd_mv {
void __iomem *cap_regs;
void __iomem *op_regs;

struct otg_transceiver *otg;
struct usb_phy *otg;

struct mv_usb_platform_data *pdata;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct tegra_ehci_hcd {
struct tegra_usb_phy *phy;
struct clk *clk;
struct clk *emc_clk;
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
int host_resumed;
int bus_suspended;
int port_resuming;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct ehci_hcd { /* one per controller */
/*
* OTG controllers and transceivers need software interaction
*/
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
};

/* convert between an HCD pointer and the corresponding EHCI_HCD */
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ohci.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ struct ohci_hcd {
* OTG controllers and transceivers need software interaction;
* other external transceivers should be software-transparent
*/
struct otg_transceiver *transceiver;
struct usb_phy *transceiver;
void (*start_hnp)(struct ohci_hcd *ohci);

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/musb/blackfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static void bfin_musb_set_vbus(struct musb *musb, int is_on)
musb_readb(musb->mregs, MUSB_DEVCTL));
}

static int bfin_musb_set_power(struct otg_transceiver *x, unsigned mA)
static int bfin_musb_set_power(struct usb_phy *x, unsigned mA)
{
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static inline struct musb *dev_to_musb(struct device *dev)
/*-------------------------------------------------------------------------*/

#ifndef CONFIG_BLACKFIN
static int musb_ulpi_read(struct otg_transceiver *otg, u32 offset)
static int musb_ulpi_read(struct usb_phy *otg, u32 offset)
{
void __iomem *addr = otg->io_priv;
int i = 0;
Expand Down Expand Up @@ -165,7 +165,7 @@ static int musb_ulpi_read(struct otg_transceiver *otg, u32 offset)
return musb_readb(addr, MUSB_ULPI_REG_DATA);
}

static int musb_ulpi_write(struct otg_transceiver *otg,
static int musb_ulpi_write(struct usb_phy *otg,
u32 offset, u32 data)
{
void __iomem *addr = otg->io_priv;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/musb/musb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ struct musb {
u16 int_rx;
u16 int_tx;

struct otg_transceiver *xceiv;
struct usb_phy *xceiv;
u8 xceiv_event;

int nIrq;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/musb/tusb6010.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static struct musb *the_musb;
* mode), or low power Default-B sessions, something else supplies power.
* Caller must take care of locking.
*/
static int tusb_draw_power(struct otg_transceiver *x, unsigned mA)
static int tusb_draw_power(struct usb_phy *x, unsigned mA)
{
struct musb *musb = the_musb;
void __iomem *tbase = musb->ctrl_base;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/otg/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ config USB_GPIO_VBUS
select USB_OTG_UTILS
help
Provides simple GPIO VBUS sensing for controllers with an
internal transceiver via the otg_transceiver interface, and
internal transceiver via the usb_phy interface, and
optionally control of a D+ pullup GPIO as well as a VBUS
current limit regulator.

Expand Down
Loading

0 comments on commit 8675381

Please sign in to comment.