]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: otg: Rename otg_transceiver to usb_phy
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 13 Feb 2012 11:24:02 +0000 (13:24 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 13 Feb 2012 11:34:36 +0000 (13:34 +0200)
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>
48 files changed:
arch/arm/mach-imx/mx31moboard-devboard.c
arch/arm/mach-imx/mx31moboard-marxbot.c
arch/arm/mach-pxa/pxa3xx-ulpi.c
arch/arm/mach-tegra/include/mach/usb_phy.h
arch/arm/plat-mxc/include/mach/mxc_ehci.h
arch/arm/plat-mxc/include/mach/ulpi.h
arch/arm/plat-mxc/ulpi.c
drivers/power/isp1704_charger.c
drivers/power/pda_power.c
drivers/power/twl4030_charger.c
drivers/usb/gadget/ci13xxx_udc.h
drivers/usb/gadget/fsl_usb2_udc.h
drivers/usb/gadget/langwell_udc.h
drivers/usb/gadget/mv_udc.h
drivers/usb/gadget/omap_udc.c
drivers/usb/gadget/omap_udc.h
drivers/usb/gadget/pxa25x_udc.h
drivers/usb/gadget/pxa27x_udc.h
drivers/usb/gadget/s3c-hsudc.c
drivers/usb/host/ehci-msm.c
drivers/usb/host/ehci-mv.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci.h
drivers/usb/host/ohci.h
drivers/usb/musb/blackfin.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/tusb6010.c
drivers/usb/otg/Kconfig
drivers/usb/otg/ab8500-usb.c
drivers/usb/otg/fsl_otg.c
drivers/usb/otg/fsl_otg.h
drivers/usb/otg/gpio_vbus.c
drivers/usb/otg/isp1301_omap.c
drivers/usb/otg/msm_otg.c
drivers/usb/otg/mv_otg.c
drivers/usb/otg/mv_otg.h
drivers/usb/otg/nop-usb-xceiv.c
drivers/usb/otg/otg.c
drivers/usb/otg/otg_fsm.h
drivers/usb/otg/twl4030-usb.c
drivers/usb/otg/twl6030-usb.c
drivers/usb/otg/ulpi.c
drivers/usb/otg/ulpi_viewport.c
include/linux/usb/intel_mid_otg.h
include/linux/usb/msm_hsusb.h
include/linux/usb/otg.h
include/linux/usb/ulpi.h

index 0aa25364360dbcd78d1eea3a3af31164a4a9c6d6..9cd4a97efa52415a100d628e1decd12c40f25946 100644 (file)
@@ -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)
@@ -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);
@@ -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);
index bb639cbda4e5a7b9c847e5159000480eaa93e020..2be769bbe05ed0542d45fce7532f190bbc5b17d2 100644 (file)
@@ -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)
@@ -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);
@@ -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);
index e28dfb88827f8eda6994869de3d864d9f10f85cf..960d0ac50418e407eee9fc678988e19b79442f81 100644 (file)
@@ -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;
 };
 
@@ -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;
 
@@ -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__);
index d4b8f9e298a8a8502e0de7e5f67227bf91737ba9..de1a0f602b2891c5dfd2eeb3b0322c1ba84f3adf 100644 (file)
@@ -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,
index 2c159dc2398b52c50e5064927077cd718921a2f6..9ffd1bbe615f91fc598268c69be4aa35b2b9dcff 100644 (file)
@@ -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);
index f9161c96d7bdea67e2b12aca611b291cf230ddd9..d39d94a170e770e1874a70831560e301d85741ba 100644 (file)
@@ -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;
 }
index 477e45bea1be1e84d26761ecec6f18ba6b1d37e2..8eeeb6b979c47d83ac09b25c98d0df31590093ad 100644 (file)
@@ -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;
@@ -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;
@@ -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);
 }
index b806667b59ae68639a43b1a52ed95c0ad4fce638..51cdea4fc0348c65db1569e9ff6d1cbf95931614 100644 (file)
@@ -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;
 
index fd49689738af92a8c03e65264410fcc5e313c276..dcf07f55eb04e35b9005d035759dd38d01952ade 100644 (file)
@@ -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
 
index 54b9198fa576a12b1d7f59a2ecc1463786cb0196..b3ead2305b4ca180db80dba3f4cdcd4128856167 100644 (file)
@@ -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;
index f4871e1fac5965d13bc1a738197363a8033029ce..0d31af56c989b2817b1c9593b7f5b6d5821c80ab 100644 (file)
@@ -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 */
 };
 
 /******************************************************************************
index f781f5dec41776629584a33a1be5817d8e6778d6..e651469fd39b8f25b02bb4c9ff55ab9dc5c033ac 100644 (file)
@@ -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;
index d6e78accaffee7d8fc68d26291c404e5846d5ac2..8c8087abb481afbc10d6f889c53c412f2cb10a29 100644 (file)
@@ -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;
index 34aadfae723da4952f541fd4358fe2f65fd1c3d8..e2be9519abbe8253dded6e29c1e4602137ec9b4f 100644 (file)
@@ -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;
 
index 576cd8578b452eac99a1bd15cdb81031c34da090..d3529787351d5cd7c5fbc42a4655ac8402fa9656 100644 (file)
@@ -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;
 
@@ -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;
index 29edc51b6b2212dba3df4853dea948cd5c878223..59d3b2213cb1cf5c446f683ba63011f9be7f071d 100644 (file)
@@ -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;
index 8eaf4e43726b462f9c812173b002f6ed4944f01f..893e917f048ee381a9d41a53f30cb93a465c849c 100644 (file)
@@ -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];
 
index 7f4e8f424e80660e3cc5546816a6bf2dbce3ed91..a1d268c6f2ccb243249e19e7f2c7a87936ac2eec 100644 (file)
@@ -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;
index df8661d266cb0f89517d8d0515136a9128d38a98..dea475a61fd33be5579662860a2e8486a87af0ed 100644 (file)
@@ -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;
index 592d5f76803eef7b75670f5f0b78c4dfa8083856..ef7c4319c6e4a1cab5e6543adf3a578e905819f6 100644 (file)
@@ -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)
 {
index 52a604fb9321a3b42b30f1fc9d0a631fe4f4c461..39ca79e008d985ce927e40fc8d30f99a08a7474c 100644 (file)
@@ -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;
 
index dbc7fe8ca9e7d692dc750d58e49e3bbcc13b6140..2e157144dcf6e13c2a348e01121c949cc6d4f4f8 100644 (file)
@@ -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;
index 0a5fda73b3f2f48a6918f7e752e8d39516a6ae12..8f9acbc96fde03bf320ed1a696f0fb7b164a45e3 100644 (file)
@@ -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 */
index 8ff6f7ea96fd1f28a970cce75b36bacdc9dd21ed..1b19aea25a2bc1281d601cbe64de7e74274c1a24 100644 (file)
@@ -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);
 
        /*
index 5e7cfba5b079b02d781710c106cfbbe38f37a358..fc8e9edbcb826d2c2cc6f3b9eb28819cd7afceed 100644 (file)
@@ -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;
 }
index 3d11cf64ebd17d6b318df2bd33f696a15029da8a..7b7ecf6c65b7b9b473b0ad1031ecc70305d5de3f 100644 (file)
@@ -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;
@@ -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;
index 3d28fb8a2dc949d3aa7605a5b80c2471da18c565..93de517a32a00009aeffbdf6691906a979ae506f 100644 (file)
@@ -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;
index 1f405616e6cd96f1f1d6df0ccca048a10a76ae93..5ce01bdb19519f85e91d3b5aeffc07184be871ca 100644 (file)
@@ -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;
index 76d6293454185134247929dc7cad69c367fd48fa..b353b393448ae0c13b5f9c3ee2d1cccc516f419c 100644 (file)
@@ -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.
 
index 74fe6e62e0f7c6a18552d3958c3f6ad6580b80c5..5f06dda7db61d8e07db12ebd499d5505e44d450b 100644 (file)
@@ -68,7 +68,7 @@ enum ab8500_usb_link_status {
 };
 
 struct ab8500_usb {
-       struct otg_transceiver otg;
+       struct usb_phy otg;
        struct device *dev;
        int irq_num_id_rise;
        int irq_num_id_fall;
@@ -82,7 +82,7 @@ struct ab8500_usb {
        int rev;
 };
 
-static inline struct ab8500_usb *xceiv_to_ab(struct otg_transceiver *x)
+static inline struct ab8500_usb *xceiv_to_ab(struct usb_phy *x)
 {
        return container_of(x, struct ab8500_usb, otg);
 }
@@ -269,7 +269,7 @@ static void ab8500_usb_phy_disable_work(struct work_struct *work)
                ab8500_usb_peri_phy_dis(ab);
 }
 
-static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA)
+static int ab8500_usb_set_power(struct usb_phy *otg, unsigned mA)
 {
        struct ab8500_usb *ab;
 
@@ -290,13 +290,13 @@ static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA)
  * ab->vbus_draw.
  */
 
-static int ab8500_usb_set_suspend(struct otg_transceiver *x, int suspend)
+static int ab8500_usb_set_suspend(struct usb_phy *x, int suspend)
 {
        /* TODO */
        return 0;
 }
 
-static int ab8500_usb_set_peripheral(struct otg_transceiver *otg,
+static int ab8500_usb_set_peripheral(struct usb_phy *otg,
                struct usb_gadget *gadget)
 {
        struct ab8500_usb *ab;
@@ -329,7 +329,7 @@ static int ab8500_usb_set_peripheral(struct otg_transceiver *otg,
        return 0;
 }
 
-static int ab8500_usb_set_host(struct otg_transceiver *otg,
+static int ab8500_usb_set_host(struct usb_phy *otg,
                                        struct usb_bus *host)
 {
        struct ab8500_usb *ab;
index a190850d2d3b9d589ff6bdb42754936453653e20..66db2a1174440d3fd40681c6edd319041772e736 100644 (file)
@@ -452,7 +452,7 @@ void otg_reset_controller(void)
 /* Call suspend/resume routines in host driver */
 int fsl_otg_start_host(struct otg_fsm *fsm, int on)
 {
-       struct otg_transceiver *xceiv = fsm->transceiver;
+       struct usb_phy *xceiv = fsm->transceiver;
        struct device *dev;
        struct fsl_otg *otg_dev = container_of(xceiv, struct fsl_otg, otg);
        u32 retval = 0;
@@ -518,7 +518,7 @@ end:
  */
 int fsl_otg_start_gadget(struct otg_fsm *fsm, int on)
 {
-       struct otg_transceiver *xceiv = fsm->transceiver;
+       struct usb_phy *xceiv = fsm->transceiver;
        struct device *dev;
 
        if (!xceiv->gadget || !xceiv->gadget->dev.parent)
@@ -542,7 +542,7 @@ int fsl_otg_start_gadget(struct otg_fsm *fsm, int on)
  * Called by initialization code of host driver.  Register host controller
  * to the OTG.  Suspend host for OTG role detection.
  */
-static int fsl_otg_set_host(struct otg_transceiver *otg_p, struct usb_bus *host)
+static int fsl_otg_set_host(struct usb_phy *otg_p, struct usb_bus *host)
 {
        struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg);
 
@@ -587,7 +587,7 @@ static int fsl_otg_set_host(struct otg_transceiver *otg_p, struct usb_bus *host)
 }
 
 /* Called by initialization code of udc.  Register udc to OTG. */
-static int fsl_otg_set_peripheral(struct otg_transceiver *otg_p,
+static int fsl_otg_set_peripheral(struct usb_phy *otg_p,
                                  struct usb_gadget *gadget)
 {
        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,
 }
 
 /* Set OTG port power, only for B-device */
-static int fsl_otg_set_power(struct otg_transceiver *otg_p, unsigned mA)
+static int fsl_otg_set_power(struct usb_phy *otg_p, unsigned mA)
 {
        if (!fsl_otg_dev)
                return -ENODEV;
@@ -658,7 +658,7 @@ static void fsl_otg_event(struct work_struct *work)
 }
 
 /* B-device start SRP */
-static int fsl_otg_start_srp(struct otg_transceiver *otg_p)
+static int fsl_otg_start_srp(struct usb_phy *otg_p)
 {
        struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg);
 
@@ -673,7 +673,7 @@ static int fsl_otg_start_srp(struct otg_transceiver *otg_p)
 }
 
 /* A_host suspend will call this function to start hnp */
-static int fsl_otg_start_hnp(struct otg_transceiver *otg_p)
+static int fsl_otg_start_hnp(struct usb_phy *otg_p)
 {
        struct fsl_otg *otg_dev = container_of(otg_p, struct fsl_otg, otg);
 
@@ -698,7 +698,7 @@ static int fsl_otg_start_hnp(struct otg_transceiver *otg_p)
 irqreturn_t fsl_otg_isr(int irq, void *dev_id)
 {
        struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm;
-       struct otg_transceiver *otg = &((struct fsl_otg *)dev_id)->otg;
+       struct usb_phy *otg = &((struct fsl_otg *)dev_id)->otg;
        u32 otg_int_src, otg_sc;
 
        otg_sc = fsl_readl(&usb_dr_regs->otgsc);
@@ -815,7 +815,7 @@ err:
 int usb_otg_start(struct platform_device *pdev)
 {
        struct fsl_otg *p_otg;
-       struct otg_transceiver *otg_trans = otg_get_transceiver();
+       struct usb_phy *otg_trans = otg_get_transceiver();
        struct otg_fsm *fsm;
        int status;
        struct resource *res;
index 3f8ef731aac95f7c5dfcfb505cd09a1952878a3f..caec254ad8192e02d34103fe01058cde71f61c61 100644 (file)
@@ -369,7 +369,7 @@ inline struct fsl_otg_timer *otg_timer_initializer
 }
 
 struct fsl_otg {
-       struct otg_transceiver otg;
+       struct usb_phy otg;
        struct otg_fsm fsm;
        struct usb_dr_mmap *dr_mem_map;
        struct delayed_work otg_event;
index fb644c107ded74930105d23b70e4e4c2b591f8ea..4e1b1384dc89e6674f3af1525045b87a56ccc905 100644 (file)
@@ -32,7 +32,7 @@
  * Needs to be loaded before the UDC driver that will use it.
  */
 struct gpio_vbus_data {
-       struct otg_transceiver otg;
+       struct usb_phy          otg;
        struct device          *dev;
        struct regulator       *vbus_draw;
        int                     vbus_draw_enabled;
@@ -149,7 +149,7 @@ static irqreturn_t gpio_vbus_irq(int irq, void *data)
 /* OTG transceiver interface */
 
 /* bind/unbind the peripheral controller */
-static int gpio_vbus_set_peripheral(struct otg_transceiver *otg,
+static int gpio_vbus_set_peripheral(struct usb_phy *otg,
                                struct usb_gadget *gadget)
 {
        struct gpio_vbus_data *gpio_vbus;
@@ -189,7 +189,7 @@ static int gpio_vbus_set_peripheral(struct otg_transceiver *otg,
 }
 
 /* effective for B devices, ignored for A-peripheral */
-static int gpio_vbus_set_power(struct otg_transceiver *otg, unsigned mA)
+static int gpio_vbus_set_power(struct usb_phy *otg, unsigned mA)
 {
        struct gpio_vbus_data *gpio_vbus;
 
@@ -201,7 +201,7 @@ static int gpio_vbus_set_power(struct otg_transceiver *otg, unsigned mA)
 }
 
 /* for non-OTG B devices: set/clear transceiver suspend mode */
-static int gpio_vbus_set_suspend(struct otg_transceiver *otg, int suspend)
+static int gpio_vbus_set_suspend(struct usb_phy *otg, int suspend)
 {
        struct gpio_vbus_data *gpio_vbus;
 
index 8c86787c2f09a23668b510d72235814ee6c072cd..1bc27948ac229ca28ab18dd764bf06f3d01d4545 100644 (file)
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ISP1301 USB OTG Transceiver Driver");
 MODULE_LICENSE("GPL");
 
 struct isp1301 {
-       struct otg_transceiver  otg;
+       struct usb_phy          otg;
        struct i2c_client       *client;
        void                    (*i2c_release)(struct device *dev);
 
@@ -1274,7 +1274,7 @@ static int isp1301_otg_enable(struct isp1301 *isp)
 
 /* add or disable the host device+driver */
 static int
-isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host)
+isp1301_set_host(struct usb_phy *otg, struct usb_bus *host)
 {
        struct isp1301  *isp = container_of(otg, struct isp1301, otg);
 
@@ -1330,7 +1330,7 @@ isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host)
 }
 
 static int
-isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
+isp1301_set_peripheral(struct usb_phy *otg, struct usb_gadget *gadget)
 {
        struct isp1301  *isp = container_of(otg, struct isp1301, otg);
 #ifndef        CONFIG_USB_OTG
@@ -1399,7 +1399,7 @@ isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
 /*-------------------------------------------------------------------------*/
 
 static int
-isp1301_set_power(struct otg_transceiver *dev, unsigned mA)
+isp1301_set_power(struct usb_phy *dev, unsigned mA)
 {
        if (!the_transceiver)
                return -ENODEV;
@@ -1409,7 +1409,7 @@ isp1301_set_power(struct otg_transceiver *dev, unsigned mA)
 }
 
 static int
-isp1301_start_srp(struct otg_transceiver *dev)
+isp1301_start_srp(struct usb_phy *dev)
 {
        struct isp1301  *isp = container_of(dev, struct isp1301, otg);
        u32             otg_ctrl;
@@ -1436,7 +1436,7 @@ isp1301_start_srp(struct otg_transceiver *dev)
 }
 
 static int
-isp1301_start_hnp(struct otg_transceiver *dev)
+isp1301_start_hnp(struct usb_phy *dev)
 {
 #ifdef CONFIG_USB_OTG
        struct isp1301  *isp = container_of(dev, struct isp1301, otg);
index b276f8fcdeba7970f24f2457e406112cc0721743..cba4737a04f4a38cfc800a185605de2e370e4a61 100644 (file)
@@ -235,7 +235,7 @@ static int msm_hsusb_ldo_set_mode(int on)
        return ret < 0 ? ret : 0;
 }
 
-static int ulpi_read(struct otg_transceiver *otg, u32 reg)
+static int ulpi_read(struct usb_phy *otg, u32 reg)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
        int cnt = 0;
@@ -260,7 +260,7 @@ static int ulpi_read(struct otg_transceiver *otg, u32 reg)
        return ULPI_DATA_READ(readl(USB_ULPI_VIEWPORT));
 }
 
-static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg)
+static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
        int cnt = 0;
@@ -390,7 +390,7 @@ static int msm_otg_phy_reset(struct msm_otg *motg)
 }
 
 #define LINK_RESET_TIMEOUT_USEC                (250 * 1000)
-static int msm_otg_reset(struct otg_transceiver *otg)
+static int msm_otg_reset(struct usb_phy *otg)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
        struct msm_otg_platform_data *pdata = motg->pdata;
@@ -448,7 +448,7 @@ static int msm_otg_reset(struct otg_transceiver *otg)
 #ifdef CONFIG_PM_SLEEP
 static int msm_otg_suspend(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        struct usb_bus *bus = otg->host;
        struct msm_otg_platform_data *pdata = motg->pdata;
        int cnt = 0;
@@ -543,7 +543,7 @@ static int msm_otg_suspend(struct msm_otg *motg)
 
 static int msm_otg_resume(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        struct usb_bus *bus = otg->host;
        int cnt = 0;
        unsigned temp;
@@ -627,7 +627,7 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA)
        motg->cur_power = mA;
 }
 
-static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA)
+static int msm_otg_set_power(struct usb_phy *otg, unsigned mA)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
 
@@ -644,7 +644,7 @@ static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA)
        return 0;
 }
 
-static void msm_otg_start_host(struct otg_transceiver *otg, int on)
+static void msm_otg_start_host(struct usb_phy *otg, int on)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
        struct msm_otg_platform_data *pdata = motg->pdata;
@@ -683,7 +683,7 @@ static void msm_otg_start_host(struct otg_transceiver *otg, int on)
        }
 }
 
-static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host)
+static int msm_otg_set_host(struct usb_phy *otg, struct usb_bus *host)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
        struct usb_hcd *hcd;
@@ -729,7 +729,7 @@ static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host)
        return 0;
 }
 
-static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on)
+static void msm_otg_start_peripheral(struct usb_phy *otg, int on)
 {
        struct msm_otg *motg = container_of(otg, struct msm_otg, otg);
        struct msm_otg_platform_data *pdata = motg->pdata;
@@ -756,7 +756,7 @@ static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on)
 
 }
 
-static int msm_otg_set_peripheral(struct otg_transceiver *otg,
+static int msm_otg_set_peripheral(struct usb_phy *otg,
                        struct usb_gadget *gadget)
 {
        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,
 
 static bool msm_chg_check_secondary_det(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 chg_det;
        bool ret = false;
 
@@ -821,7 +821,7 @@ static bool msm_chg_check_secondary_det(struct msm_otg *motg)
 
 static void msm_chg_enable_secondary_det(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 chg_det;
 
        switch (motg->pdata->phy_type) {
@@ -861,7 +861,7 @@ static void msm_chg_enable_secondary_det(struct msm_otg *motg)
 
 static bool msm_chg_check_primary_det(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 chg_det;
        bool ret = false;
 
@@ -882,7 +882,7 @@ static bool msm_chg_check_primary_det(struct msm_otg *motg)
 
 static void msm_chg_enable_primary_det(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 chg_det;
 
        switch (motg->pdata->phy_type) {
@@ -907,7 +907,7 @@ static void msm_chg_enable_primary_det(struct msm_otg *motg)
 
 static bool msm_chg_check_dcd(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 line_state;
        bool ret = false;
 
@@ -928,7 +928,7 @@ static bool msm_chg_check_dcd(struct msm_otg *motg)
 
 static void msm_chg_disable_dcd(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 chg_det;
 
        switch (motg->pdata->phy_type) {
@@ -947,7 +947,7 @@ static void msm_chg_disable_dcd(struct msm_otg *motg)
 
 static void msm_chg_enable_dcd(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 chg_det;
 
        switch (motg->pdata->phy_type) {
@@ -968,7 +968,7 @@ static void msm_chg_enable_dcd(struct msm_otg *motg)
 
 static void msm_chg_block_on(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 func_ctrl, chg_det;
 
        /* put the controller in non-driving mode */
@@ -1003,7 +1003,7 @@ static void msm_chg_block_on(struct msm_otg *motg)
 
 static void msm_chg_block_off(struct msm_otg *motg)
 {
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 func_ctrl, chg_det;
 
        switch (motg->pdata->phy_type) {
@@ -1038,7 +1038,7 @@ static void msm_chg_block_off(struct msm_otg *motg)
 static void msm_chg_detect_work(struct work_struct *w)
 {
        struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work);
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        bool is_dcd, tmout, vout;
        unsigned long delay;
 
@@ -1152,7 +1152,7 @@ static void msm_otg_init_sm(struct msm_otg *motg)
 static void msm_otg_sm_work(struct work_struct *w)
 {
        struct msm_otg *motg = container_of(w, struct msm_otg, sm_work);
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
 
        switch (otg->state) {
        case OTG_STATE_UNDEFINED:
@@ -1243,7 +1243,7 @@ static void msm_otg_sm_work(struct work_struct *w)
 static irqreturn_t msm_otg_irq(int irq, void *data)
 {
        struct msm_otg *motg = data;
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        u32 otgsc = 0;
 
        if (atomic_read(&motg->in_lpm)) {
@@ -1281,7 +1281,7 @@ static irqreturn_t msm_otg_irq(int irq, void *data)
 static int msm_otg_mode_show(struct seq_file *s, void *unused)
 {
        struct msm_otg *motg = s->private;
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
 
        switch (otg->state) {
        case OTG_STATE_A_HOST:
@@ -1309,7 +1309,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
        struct seq_file *s = file->private_data;
        struct msm_otg *motg = s->private;
        char buf[16];
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        int status = count;
        enum usb_mode_type req_mode;
 
@@ -1414,7 +1414,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
        int ret = 0;
        struct resource *res;
        struct msm_otg *motg;
-       struct otg_transceiver *otg;
+       struct usb_phy *otg;
 
        dev_info(&pdev->dev, "msm_otg probe\n");
        if (!pdev->dev.platform_data) {
@@ -1598,7 +1598,7 @@ free_motg:
 static int __devexit msm_otg_remove(struct platform_device *pdev)
 {
        struct msm_otg *motg = platform_get_drvdata(pdev);
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
        int cnt = 0;
 
        if (otg->host || otg->gadget)
@@ -1660,7 +1660,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev)
 static int msm_otg_runtime_idle(struct device *dev)
 {
        struct msm_otg *motg = dev_get_drvdata(dev);
-       struct otg_transceiver *otg = &motg->otg;
+       struct usb_phy *otg = &motg->otg;
 
        dev_dbg(dev, "OTG runtime idle\n");
 
index b5fbe1452ab00e83b2a25dff027548a31b56ff29..6e05d58effe12d8aad924f5c7b324e5f57b47d35 100644 (file)
@@ -55,7 +55,7 @@ static char *state_string[] = {
        "a_vbus_err"
 };
 
-static int mv_otg_set_vbus(struct otg_transceiver *otg, bool on)
+static int mv_otg_set_vbus(struct usb_phy *otg, bool on)
 {
        struct mv_otg *mvotg = container_of(otg, struct mv_otg, otg);
        if (mvotg->pdata->set_vbus == NULL)
@@ -64,7 +64,7 @@ static int mv_otg_set_vbus(struct otg_transceiver *otg, bool on)
        return mvotg->pdata->set_vbus(on);
 }
 
-static int mv_otg_set_host(struct otg_transceiver *otg,
+static int mv_otg_set_host(struct usb_phy *otg,
                           struct usb_bus *host)
 {
        otg->host = host;
@@ -72,7 +72,7 @@ static int mv_otg_set_host(struct otg_transceiver *otg,
        return 0;
 }
 
-static int mv_otg_set_peripheral(struct otg_transceiver *otg,
+static int mv_otg_set_peripheral(struct usb_phy *otg,
                                 struct usb_gadget *gadget)
 {
        otg->gadget = gadget;
@@ -203,7 +203,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg)
 static void mv_otg_start_host(struct mv_otg *mvotg, int on)
 {
 #ifdef CONFIG_USB
-       struct otg_transceiver *otg = &mvotg->otg;
+       struct usb_phy *otg = &mvotg->otg;
        struct usb_hcd *hcd;
 
        if (!otg->host)
@@ -222,7 +222,7 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on)
 
 static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on)
 {
-       struct otg_transceiver *otg = &mvotg->otg;
+       struct usb_phy *otg = &mvotg->otg;
 
        if (!otg->gadget)
                return;
@@ -343,7 +343,7 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg)
 static void mv_otg_update_state(struct mv_otg *mvotg)
 {
        struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl;
-       struct otg_transceiver *otg = &mvotg->otg;
+       struct usb_phy *otg = &mvotg->otg;
        int old_state = otg->state;
 
        switch (old_state) {
@@ -416,7 +416,7 @@ static void mv_otg_update_state(struct mv_otg *mvotg)
 static void mv_otg_work(struct work_struct *work)
 {
        struct mv_otg *mvotg;
-       struct otg_transceiver *otg;
+       struct usb_phy *otg;
        int old_state;
 
        mvotg = container_of((struct delayed_work *)work, struct mv_otg, work);
index be6ca1437645b3c400603a4ad776d621fe74fcb8..a74ee07a27270fbb29572e1bf4727713aafb3dbb 100644 (file)
@@ -136,7 +136,7 @@ struct mv_otg_regs {
 };
 
 struct mv_otg {
-       struct otg_transceiver otg;
+       struct usb_phy otg;
        struct mv_otg_ctrl otg_ctrl;
 
        /* base address */
index c1e360046435adc834d5838f957f41bb5353ddb5..2ab02799706090e0319228e50d0727e61cc8ced9 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/slab.h>
 
 struct nop_usb_xceiv {
-       struct otg_transceiver  otg;
+       struct usb_phy          otg;
        struct device           *dev;
 };
 
@@ -58,17 +58,17 @@ void usb_nop_xceiv_unregister(void)
 }
 EXPORT_SYMBOL(usb_nop_xceiv_unregister);
 
-static inline struct nop_usb_xceiv *xceiv_to_nop(struct otg_transceiver *x)
+static inline struct nop_usb_xceiv *xceiv_to_nop(struct usb_phy *x)
 {
        return container_of(x, struct nop_usb_xceiv, otg);
 }
 
-static int nop_set_suspend(struct otg_transceiver *x, int suspend)
+static int nop_set_suspend(struct usb_phy *x, int suspend)
 {
        return 0;
 }
 
-static int nop_set_peripheral(struct otg_transceiver *x,
+static int nop_set_peripheral(struct usb_phy *x,
                struct usb_gadget *gadget)
 {
        struct nop_usb_xceiv *nop;
@@ -88,7 +88,7 @@ static int nop_set_peripheral(struct otg_transceiver *x,
        return 0;
 }
 
-static int nop_set_host(struct otg_transceiver *x, struct usb_bus *host)
+static int nop_set_host(struct usb_phy *x, struct usb_bus *host)
 {
        struct nop_usb_xceiv *nop;
 
index 307c27bc51eb34e62a07dc627dcbcdedd4de2843..56c0f1781d8c52b2dbf9f3d6ec41c8e7b592d220 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <linux/usb/otg.h>
 
-static struct otg_transceiver *xceiv;
+static struct usb_phy *xceiv;
 
 /**
  * otg_get_transceiver - find the (single) OTG transceiver
@@ -26,7 +26,7 @@ static struct otg_transceiver *xceiv;
  *
  * For use by USB host and peripheral drivers.
  */
-struct otg_transceiver *otg_get_transceiver(void)
+struct usb_phy *otg_get_transceiver(void)
 {
        if (xceiv)
                get_device(xceiv->dev);
@@ -42,7 +42,7 @@ EXPORT_SYMBOL(otg_get_transceiver);
  *
  * For use by USB host and peripheral drivers.
  */
-void otg_put_transceiver(struct otg_transceiver *x)
+void otg_put_transceiver(struct usb_phy *x)
 {
        if (x)
                put_device(x->dev);
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(otg_put_transceiver);
  * coordinate the activities of drivers for host and peripheral
  * controllers, and in some cases for VBUS current regulation.
  */
-int otg_set_transceiver(struct otg_transceiver *x)
+int otg_set_transceiver(struct usb_phy *x)
 {
        if (xceiv && x)
                return -EBUSY;
index 0cecf1d593a0f6251ce42fde97d785a6e06a7958..5e589ae9a1996b59e0cfe054ee59bd3c873dcf8b 100644 (file)
@@ -82,7 +82,7 @@ struct otg_fsm {
        int loc_sof;
 
        struct otg_fsm_ops *ops;
-       struct otg_transceiver *transceiver;
+       struct usb_phy *transceiver;
 
        /* Current usb protocol used: 0:undefine; 1:host; 2:client */
        int protocol;
index 14f66c35862938adc5817c123233521c9ca1f925..beeecc239d18aa056c656f293dfad4e633f7ca0e 100644 (file)
 #define GPIO_USB_4PIN_ULPI_2430C       (3 << 0)
 
 struct twl4030_usb {
-       struct otg_transceiver  otg;
+       struct usb_phy          otg;
        struct device           *dev;
 
        /* TWL4030 internal USB regulator supplies */
@@ -548,7 +548,7 @@ static void twl4030_usb_phy_init(struct twl4030_usb *twl)
        sysfs_notify(&twl->dev->kobj, NULL, "vbus");
 }
 
-static int twl4030_set_suspend(struct otg_transceiver *x, int suspend)
+static int twl4030_set_suspend(struct usb_phy *x, int suspend)
 {
        struct twl4030_usb *twl = xceiv_to_twl(x);
 
@@ -560,7 +560,7 @@ static int twl4030_set_suspend(struct otg_transceiver *x, int suspend)
        return 0;
 }
 
-static int twl4030_set_peripheral(struct otg_transceiver *x,
+static int twl4030_set_peripheral(struct usb_phy *x,
                struct usb_gadget *gadget)
 {
        struct twl4030_usb *twl;
@@ -576,7 +576,7 @@ static int twl4030_set_peripheral(struct otg_transceiver *x,
        return 0;
 }
 
-static int twl4030_set_host(struct otg_transceiver *x, struct usb_bus *host)
+static int twl4030_set_host(struct usb_phy *x, struct usb_bus *host)
 {
        struct twl4030_usb *twl;
 
index ed2b26cfe8140aecd2516f1752303e5ae9b3f0d3..56c4d3d50ebec2b005571cb5c4f5d83df328decd 100644 (file)
@@ -87,7 +87,7 @@
 #define        VBUS_DET                        BIT(2)
 
 struct twl6030_usb {
-       struct otg_transceiver  otg;
+       struct usb_phy  otg;
        struct device           *dev;
 
        /* for vbus reporting with irqs disabled */
@@ -137,7 +137,7 @@ static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
        return ret;
 }
 
-static int twl6030_phy_init(struct otg_transceiver *x)
+static int twl6030_phy_init(struct usb_phy *x)
 {
        struct twl6030_usb *twl;
        struct device *dev;
@@ -155,7 +155,7 @@ static int twl6030_phy_init(struct otg_transceiver *x)
        return 0;
 }
 
-static void twl6030_phy_shutdown(struct otg_transceiver *x)
+static void twl6030_phy_shutdown(struct usb_phy *x)
 {
        struct twl6030_usb *twl;
        struct device *dev;
@@ -167,7 +167,7 @@ static void twl6030_phy_shutdown(struct otg_transceiver *x)
        pdata->phy_power(twl->dev, 0, 0);
 }
 
-static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend)
+static int twl6030_phy_suspend(struct usb_phy *x, int suspend)
 {
        struct twl6030_usb *twl = xceiv_to_twl(x);
        struct device *dev = twl->dev;
@@ -178,7 +178,7 @@ static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend)
        return 0;
 }
 
-static int twl6030_start_srp(struct otg_transceiver *x)
+static int twl6030_start_srp(struct usb_phy *x)
 {
        struct twl6030_usb *twl = xceiv_to_twl(x);
 
@@ -324,7 +324,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
        return IRQ_HANDLED;
 }
 
-static int twl6030_set_peripheral(struct otg_transceiver *x,
+static int twl6030_set_peripheral(struct usb_phy *x,
                struct usb_gadget *gadget)
 {
        struct twl6030_usb *twl;
@@ -340,7 +340,7 @@ static int twl6030_set_peripheral(struct otg_transceiver *x,
        return 0;
 }
 
-static int twl6030_enable_irq(struct otg_transceiver *x)
+static int twl6030_enable_irq(struct usb_phy *x)
 {
        struct twl6030_usb *twl = xceiv_to_twl(x);
 
@@ -376,7 +376,7 @@ static void otg_set_vbus_work(struct work_struct *data)
                                                        CHARGERUSB_CTRL1);
 }
 
-static int twl6030_set_vbus(struct otg_transceiver *x, bool enabled)
+static int twl6030_set_vbus(struct usb_phy *x, bool enabled)
 {
        struct twl6030_usb *twl = xceiv_to_twl(x);
 
@@ -386,7 +386,7 @@ static int twl6030_set_vbus(struct otg_transceiver *x, bool enabled)
        return 0;
 }
 
-static int twl6030_set_host(struct otg_transceiver *x, struct usb_bus *host)
+static int twl6030_set_host(struct usb_phy *x, struct usb_bus *host)
 {
        struct twl6030_usb *twl;
 
index 0b0466728fdc38e63a29a5c5375b712c6347df54..51841ed829ab7dc7bfe81c65b8e73b519c636c72 100644 (file)
@@ -49,7 +49,7 @@ static struct ulpi_info ulpi_ids[] = {
        ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB331x"),
 };
 
-static int ulpi_set_otg_flags(struct otg_transceiver *otg)
+static int ulpi_set_otg_flags(struct usb_phy *otg)
 {
        unsigned int flags = ULPI_OTG_CTRL_DP_PULLDOWN |
                             ULPI_OTG_CTRL_DM_PULLDOWN;
@@ -73,7 +73,7 @@ static int ulpi_set_otg_flags(struct otg_transceiver *otg)
        return otg_io_write(otg, flags, ULPI_OTG_CTRL);
 }
 
-static int ulpi_set_fc_flags(struct otg_transceiver *otg)
+static int ulpi_set_fc_flags(struct usb_phy *otg)
 {
        unsigned int flags = 0;
 
@@ -115,7 +115,7 @@ static int ulpi_set_fc_flags(struct otg_transceiver *otg)
        return otg_io_write(otg, flags, ULPI_FUNC_CTRL);
 }
 
-static int ulpi_set_ic_flags(struct otg_transceiver *otg)
+static int ulpi_set_ic_flags(struct usb_phy *otg)
 {
        unsigned int flags = 0;
 
@@ -134,7 +134,7 @@ static int ulpi_set_ic_flags(struct otg_transceiver *otg)
        return otg_io_write(otg, flags, ULPI_IFC_CTRL);
 }
 
-static int ulpi_set_flags(struct otg_transceiver *otg)
+static int ulpi_set_flags(struct usb_phy *otg)
 {
        int ret;
 
@@ -149,7 +149,7 @@ static int ulpi_set_flags(struct otg_transceiver *otg)
        return ulpi_set_fc_flags(otg);
 }
 
-static int ulpi_check_integrity(struct otg_transceiver *otg)
+static int ulpi_check_integrity(struct usb_phy *otg)
 {
        int ret, i;
        unsigned int val = 0x55;
@@ -175,7 +175,7 @@ static int ulpi_check_integrity(struct otg_transceiver *otg)
        return 0;
 }
 
-static int ulpi_init(struct otg_transceiver *otg)
+static int ulpi_init(struct usb_phy *otg)
 {
        int i, vid, pid, ret;
        u32 ulpi_id = 0;
@@ -206,7 +206,7 @@ static int ulpi_init(struct otg_transceiver *otg)
        return ulpi_set_flags(otg);
 }
 
-static int ulpi_set_host(struct otg_transceiver *otg, struct usb_bus *host)
+static int ulpi_set_host(struct usb_phy *otg, struct usb_bus *host)
 {
        unsigned int flags = otg_io_read(otg, ULPI_IFC_CTRL);
 
@@ -231,7 +231,7 @@ static int ulpi_set_host(struct otg_transceiver *otg, struct usb_bus *host)
        return otg_io_write(otg, flags, ULPI_IFC_CTRL);
 }
 
-static int ulpi_set_vbus(struct otg_transceiver *otg, bool on)
+static int ulpi_set_vbus(struct usb_phy *otg, bool on)
 {
        unsigned int flags = otg_io_read(otg, ULPI_OTG_CTRL);
 
@@ -248,11 +248,11 @@ static int ulpi_set_vbus(struct otg_transceiver *otg, bool on)
        return otg_io_write(otg, flags, ULPI_OTG_CTRL);
 }
 
-struct otg_transceiver *
+struct usb_phy *
 otg_ulpi_create(struct otg_io_access_ops *ops,
                unsigned int flags)
 {
-       struct otg_transceiver *otg;
+       struct usb_phy *otg;
 
        otg = kzalloc(sizeof(*otg), GFP_KERNEL);
        if (!otg)
index e9a37f90994f9003e7670fbed9c6a85e7705b2db..e7b311b960bd6ce7e435995e0b62d7f37ccdad52 100644 (file)
@@ -40,7 +40,7 @@ static int ulpi_viewport_wait(void __iomem *view, u32 mask)
        return -ETIMEDOUT;
 }
 
-static int ulpi_viewport_read(struct otg_transceiver *otg, u32 reg)
+static int ulpi_viewport_read(struct usb_phy *otg, u32 reg)
 {
        int ret;
        void __iomem *view = otg->io_priv;
@@ -58,7 +58,7 @@ static int ulpi_viewport_read(struct otg_transceiver *otg, u32 reg)
        return ULPI_VIEW_DATA_READ(readl(view));
 }
 
-static int ulpi_viewport_write(struct otg_transceiver *otg, u32 val, u32 reg)
+static int ulpi_viewport_write(struct usb_phy *otg, u32 val, u32 reg)
 {
        int ret;
        void __iomem *view = otg->io_priv;
index a0ccf795f362ac08fdbb3c0627a13e9c306dfc24..756cf5543ffddcc31e2a76bbaf333aefce726ee0 100644 (file)
@@ -104,11 +104,11 @@ struct iotg_ulpi_access_ops {
 /*
  * the Intel MID (Langwell/Penwell) otg transceiver driver needs to interact
  * with device and host drivers to implement the USB OTG related feature. More
- * function members are added based on otg_transceiver data structure for this
+ * function members are added based on usb_phy data structure for this
  * purpose.
  */
 struct intel_mid_otg_xceiv {
-       struct otg_transceiver  otg;
+       struct usb_phy          otg;
        struct otg_hsm          hsm;
 
        /* base address */
@@ -147,7 +147,7 @@ struct intel_mid_otg_xceiv {
 
 };
 static inline
-struct intel_mid_otg_xceiv *otg_to_mid_xceiv(struct otg_transceiver *otg)
+struct intel_mid_otg_xceiv *otg_to_mid_xceiv(struct usb_phy *otg)
 {
        return container_of(otg, struct intel_mid_otg_xceiv, otg);
 }
index 00311fe9d0df483af4c2eccf3bbb23ca4eda88b3..2d3547ae956216d05f39e55e00f718c04ada39a5 100644 (file)
@@ -160,7 +160,7 @@ struct msm_otg_platform_data {
  *               detection process.
  */
 struct msm_otg {
-       struct otg_transceiver otg;
+       struct usb_phy otg;
        struct msm_otg_platform_data *pdata;
        int irq;
        struct clk *clk;
index d87f44f5b04e437c44405c294ef03781e40cb6ca..e0bc55702a89523b88998f801a844e2486dae9ac 100644 (file)
@@ -43,14 +43,14 @@ enum usb_xceiv_events {
        USB_EVENT_ENUMERATED,   /* gadget driver enumerated */
 };
 
-struct otg_transceiver;
+struct usb_phy;
 
 /* for transceivers connected thru an ULPI interface, the user must
  * provide access ops
  */
 struct otg_io_access_ops {
-       int (*read)(struct otg_transceiver *otg, u32 reg);
-       int (*write)(struct otg_transceiver *otg, u32 val, u32 reg);
+       int (*read)(struct usb_phy *x, u32 reg);
+       int (*write)(struct usb_phy *x, u32 val, u32 reg);
 };
 
 /*
@@ -59,7 +59,7 @@ struct otg_io_access_ops {
  * moment, using the transceiver, ID signal, HNP and sometimes static
  * configuration information (including "board isn't wired for otg").
  */
-struct otg_transceiver {
+struct usb_phy {
        struct device           *dev;
        const char              *label;
        unsigned int             flags;
@@ -82,40 +82,40 @@ struct otg_transceiver {
        u16                     port_change;
 
        /* initialize/shutdown the OTG controller */
-       int     (*init)(struct otg_transceiver *otg);
-       void    (*shutdown)(struct otg_transceiver *otg);
+       int     (*init)(struct usb_phy *x);
+       void    (*shutdown)(struct usb_phy *x);
 
        /* bind/unbind the host controller */
-       int     (*set_host)(struct otg_transceiver *otg,
+       int     (*set_host)(struct usb_phy *x,
                                struct usb_bus *host);
 
        /* bind/unbind the peripheral controller */
-       int     (*set_peripheral)(struct otg_transceiver *otg,
+       int     (*set_peripheral)(struct usb_phy *x,
                                struct usb_gadget *gadget);
 
        /* effective for B devices, ignored for A-peripheral */
-       int     (*set_power)(struct otg_transceiver *otg,
+       int     (*set_power)(struct usb_phy *x,
                                unsigned mA);
 
        /* effective for A-peripheral, ignored for B devices */
-       int     (*set_vbus)(struct otg_transceiver *otg,
+       int     (*set_vbus)(struct usb_phy *x,
                                bool enabled);
 
        /* for non-OTG B devices: set transceiver into suspend mode */
-       int     (*set_suspend)(struct otg_transceiver *otg,
+       int     (*set_suspend)(struct usb_phy *x,
                                int suspend);
 
        /* for B devices only:  start session with A-Host */
-       int     (*start_srp)(struct otg_transceiver *otg);
+       int     (*start_srp)(struct usb_phy *x);
 
        /* start or continue HNP role switch */
-       int     (*start_hnp)(struct otg_transceiver *otg);
+       int     (*start_hnp)(struct usb_phy *x);
 
 };
 
 
 /* for board-specific init logic */
-extern int otg_set_transceiver(struct otg_transceiver *);
+extern int otg_set_transceiver(struct usb_phy *);
 
 #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
 /* sometimes transceivers are accessed only through e.g. ULPI */
@@ -132,50 +132,50 @@ static inline void usb_nop_xceiv_unregister(void)
 #endif
 
 /* helpers for direct access thru low-level io interface */
-static inline int otg_io_read(struct otg_transceiver *otg, u32 reg)
+static inline int otg_io_read(struct usb_phy *x, u32 reg)
 {
-       if (otg->io_ops && otg->io_ops->read)
-               return otg->io_ops->read(otg, reg);
+       if (x->io_ops && x->io_ops->read)
+               return x->io_ops->read(x, reg);
 
        return -EINVAL;
 }
 
-static inline int otg_io_write(struct otg_transceiver *otg, u32 val, u32 reg)
+static inline int otg_io_write(struct usb_phy *x, u32 val, u32 reg)
 {
-       if (otg->io_ops && otg->io_ops->write)
-               return otg->io_ops->write(otg, val, reg);
+       if (x->io_ops && x->io_ops->write)
+               return x->io_ops->write(x, val, reg);
 
        return -EINVAL;
 }
 
 static inline int
-otg_init(struct otg_transceiver *otg)
+otg_init(struct usb_phy *x)
 {
-       if (otg->init)
-               return otg->init(otg);
+       if (x->init)
+               return x->init(x);
 
        return 0;
 }
 
 static inline void
-otg_shutdown(struct otg_transceiver *otg)
+otg_shutdown(struct usb_phy *x)
 {
-       if (otg->shutdown)
-               otg->shutdown(otg);
+       if (x->shutdown)
+               x->shutdown(x);
 }
 
 /* for usb host and peripheral controller drivers */
 #ifdef CONFIG_USB_OTG_UTILS
-extern struct otg_transceiver *otg_get_transceiver(void);
-extern void otg_put_transceiver(struct otg_transceiver *);
+extern struct usb_phy *otg_get_transceiver(void);
+extern void otg_put_transceiver(struct usb_phy *);
 extern const char *otg_state_string(enum usb_otg_state state);
 #else
-static inline struct otg_transceiver *otg_get_transceiver(void)
+static inline struct usb_phy *otg_get_transceiver(void)
 {
        return NULL;
 }
 
-static inline void otg_put_transceiver(struct otg_transceiver *x)
+static inline void otg_put_transceiver(struct usb_phy *x)
 {
 }
 
@@ -187,67 +187,67 @@ static inline const char *otg_state_string(enum usb_otg_state state)
 
 /* Context: can sleep */
 static inline int
-otg_start_hnp(struct otg_transceiver *otg)
+otg_start_hnp(struct usb_phy *x)
 {
-       return otg->start_hnp(otg);
+       return x->start_hnp(x);
 }
 
 /* Context: can sleep */
 static inline int
-otg_set_vbus(struct otg_transceiver *otg, bool enabled)
+otg_set_vbus(struct usb_phy *x, bool enabled)
 {
-       return otg->set_vbus(otg, enabled);
+       return x->set_vbus(x, enabled);
 }
 
 /* for HCDs */
 static inline int
-otg_set_host(struct otg_transceiver *otg, struct usb_bus *host)
+otg_set_host(struct usb_phy *x, struct usb_bus *host)
 {
-       return otg->set_host(otg, host);
+       return x->set_host(x, host);
 }
 
 /* for usb peripheral controller drivers */
 
 /* Context: can sleep */
 static inline int
-otg_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *periph)
+otg_set_peripheral(struct usb_phy *x, struct usb_gadget *periph)
 {
-       return otg->set_peripheral(otg, periph);
+       return x->set_peripheral(x, periph);
 }
 
 static inline int
-otg_set_power(struct otg_transceiver *otg, unsigned mA)
+otg_set_power(struct usb_phy *x, unsigned mA)
 {
-       return otg->set_power(otg, mA);
+       return x->set_power(x, mA);
 }
 
 /* Context: can sleep */
 static inline int
-otg_set_suspend(struct otg_transceiver *otg, int suspend)
+otg_set_suspend(struct usb_phy *x, int suspend)
 {
-       if (otg->set_suspend != NULL)
-               return otg->set_suspend(otg, suspend);
+       if (x->set_suspend != NULL)
+               return x->set_suspend(x, suspend);
        else
                return 0;
 }
 
 static inline int
-otg_start_srp(struct otg_transceiver *otg)
+otg_start_srp(struct usb_phy *x)
 {
-       return otg->start_srp(otg);
+       return x->start_srp(x);
 }
 
 /* notifiers */
 static inline int
-otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb)
+otg_register_notifier(struct usb_phy *x, struct notifier_block *nb)
 {
-       return atomic_notifier_chain_register(&otg->notifier, nb);
+       return atomic_notifier_chain_register(&x->notifier, nb);
 }
 
 static inline void
-otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb)
+otg_unregister_notifier(struct usb_phy *x, struct notifier_block *nb)
 {
-       atomic_notifier_chain_unregister(&otg->notifier, nb);
+       atomic_notifier_chain_unregister(&x->notifier, nb);
 }
 
 /* for OTG controller drivers (and maybe other stuff) */
index 9595796d62ed76bdfd22a5004ab43de1e35fbba6..51ebf72bc449bcfee443e2045af4deacb293b85b 100644 (file)
 
 /*-------------------------------------------------------------------------*/
 
-struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
+struct usb_phy *otg_ulpi_create(struct otg_io_access_ops *ops,
                                        unsigned int flags);
 
 #ifdef CONFIG_USB_ULPI_VIEWPORT