Loading Documentation/ABI/testing/sysfs-bus-usb +11 −0 Original line number Diff line number Diff line Loading @@ -182,3 +182,14 @@ Description: USB2 hardware LPM is enabled for the device. Developer can write y/Y/1 or n/N/0 to the file to enable/disable the feature. What: /sys/bus/usb/devices/.../removable Date: February 2012 Contact: Matthew Garrett <mjg@redhat.com> Description: Some information about whether a given USB device is physically fixed to the platform can be inferred from a combination of hub decriptor bits and platform-specific data such as ACPI. This file will read either "removable" or "fixed" if the information is available, and "unknown" otherwise. No newline at end of file arch/arm/mach-imx/mx31moboard-devboard.c +15 −9 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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_otg *otg, bool on) { if (on) gpio_set_value(USBH1_VBUSEN_B, 0); Loading @@ -194,18 +194,24 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = { static int __init devboard_usbh1_init(void) { struct otg_transceiver *otg; struct usb_phy *phy; struct platform_device *pdev; otg = kzalloc(sizeof(*otg), GFP_KERNEL); if (!otg) phy = kzalloc(sizeof(*phy), GFP_KERNEL); if (!phy) return -ENOMEM; otg->label = "ISP1105"; otg->init = devboard_isp1105_init; otg->set_vbus = devboard_isp1105_set_vbus; phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); if (!phy->otg) { kfree(phy); return -ENOMEM; } phy->label = "ISP1105"; phy->init = devboard_isp1105_init; phy->otg->set_vbus = devboard_isp1105_set_vbus; usbh1_pdata.otg = otg; usbh1_pdata.otg = phy; pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); if (IS_ERR(pdev)) Loading arch/arm/mach-imx/mx31moboard-marxbot.c +15 −9 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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_otg *otg, bool on) { if (on) gpio_set_value(USBH1_VBUSEN_B, 0); Loading @@ -308,18 +308,24 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = { static int __init marxbot_usbh1_init(void) { struct otg_transceiver *otg; struct usb_phy *phy; struct platform_device *pdev; otg = kzalloc(sizeof(*otg), GFP_KERNEL); if (!otg) phy = kzalloc(sizeof(*phy), GFP_KERNEL); if (!phy) return -ENOMEM; otg->label = "ISP1105"; otg->init = marxbot_isp1105_init; otg->set_vbus = marxbot_isp1105_set_vbus; phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); if (!phy->otg) { kfree(phy); return -ENOMEM; } phy->label = "ISP1105"; phy->init = marxbot_isp1105_init; phy->otg->set_vbus = marxbot_isp1105_set_vbus; usbh1_pdata.otg = otg; usbh1_pdata.otg = phy; pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); if (IS_ERR(pdev)) Loading arch/arm/mach-pxa/pxa3xx-ulpi.c +10 −10 Original line number Diff line number Diff line Loading @@ -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; }; Loading Loading @@ -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; Loading @@ -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__); Loading @@ -111,7 +111,7 @@ static int pxa310_ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg) return pxa310_ulpi_poll(); } struct otg_io_access_ops pxa310_ulpi_access_ops = { struct usb_phy_io_ops pxa310_ulpi_access_ops = { .read = pxa310_ulpi_read, .write = pxa310_ulpi_write, }; Loading Loading @@ -139,19 +139,19 @@ static int pxa310_start_otg_host_transcvr(struct usb_bus *host) pxa310_otg_transceiver_rtsm(); err = otg_init(u2d->otg); err = usb_phy_init(u2d->otg); if (err) { pr_err("OTG transceiver init failed"); return err; } err = otg_set_vbus(u2d->otg, 1); err = otg_set_vbus(u2d->otg->otg, 1); if (err) { pr_err("OTG transceiver VBUS set failed"); return err; } err = otg_set_host(u2d->otg, host); err = otg_set_host(u2d->otg->otg, host); if (err) pr_err("OTG transceiver Host mode set failed"); Loading Loading @@ -189,9 +189,9 @@ static void pxa310_stop_otg_hc(void) { pxa310_otg_transceiver_rtsm(); otg_set_host(u2d->otg, NULL); otg_set_vbus(u2d->otg, 0); otg_shutdown(u2d->otg); otg_set_host(u2d->otg->otg, NULL); otg_set_vbus(u2d->otg->otg, 0); usb_phy_shutdown(u2d->otg); } static void pxa310_u2d_setup_otg_hc(void) Loading arch/arm/mach-tegra/include/mach/usb_phy.h +1 −1 Original line number Diff line number Diff line Loading @@ -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, Loading Loading
Documentation/ABI/testing/sysfs-bus-usb +11 −0 Original line number Diff line number Diff line Loading @@ -182,3 +182,14 @@ Description: USB2 hardware LPM is enabled for the device. Developer can write y/Y/1 or n/N/0 to the file to enable/disable the feature. What: /sys/bus/usb/devices/.../removable Date: February 2012 Contact: Matthew Garrett <mjg@redhat.com> Description: Some information about whether a given USB device is physically fixed to the platform can be inferred from a combination of hub decriptor bits and platform-specific data such as ACPI. This file will read either "removable" or "fixed" if the information is available, and "unknown" otherwise. No newline at end of file
arch/arm/mach-imx/mx31moboard-devboard.c +15 −9 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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_otg *otg, bool on) { if (on) gpio_set_value(USBH1_VBUSEN_B, 0); Loading @@ -194,18 +194,24 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = { static int __init devboard_usbh1_init(void) { struct otg_transceiver *otg; struct usb_phy *phy; struct platform_device *pdev; otg = kzalloc(sizeof(*otg), GFP_KERNEL); if (!otg) phy = kzalloc(sizeof(*phy), GFP_KERNEL); if (!phy) return -ENOMEM; otg->label = "ISP1105"; otg->init = devboard_isp1105_init; otg->set_vbus = devboard_isp1105_set_vbus; phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); if (!phy->otg) { kfree(phy); return -ENOMEM; } phy->label = "ISP1105"; phy->init = devboard_isp1105_init; phy->otg->set_vbus = devboard_isp1105_set_vbus; usbh1_pdata.otg = otg; usbh1_pdata.otg = phy; pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); if (IS_ERR(pdev)) Loading
arch/arm/mach-imx/mx31moboard-marxbot.c +15 −9 Original line number Diff line number Diff line Loading @@ -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) Loading @@ -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_otg *otg, bool on) { if (on) gpio_set_value(USBH1_VBUSEN_B, 0); Loading @@ -308,18 +308,24 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = { static int __init marxbot_usbh1_init(void) { struct otg_transceiver *otg; struct usb_phy *phy; struct platform_device *pdev; otg = kzalloc(sizeof(*otg), GFP_KERNEL); if (!otg) phy = kzalloc(sizeof(*phy), GFP_KERNEL); if (!phy) return -ENOMEM; otg->label = "ISP1105"; otg->init = marxbot_isp1105_init; otg->set_vbus = marxbot_isp1105_set_vbus; phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); if (!phy->otg) { kfree(phy); return -ENOMEM; } phy->label = "ISP1105"; phy->init = marxbot_isp1105_init; phy->otg->set_vbus = marxbot_isp1105_set_vbus; usbh1_pdata.otg = otg; usbh1_pdata.otg = phy; pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); if (IS_ERR(pdev)) Loading
arch/arm/mach-pxa/pxa3xx-ulpi.c +10 −10 Original line number Diff line number Diff line Loading @@ -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; }; Loading Loading @@ -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; Loading @@ -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__); Loading @@ -111,7 +111,7 @@ static int pxa310_ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg) return pxa310_ulpi_poll(); } struct otg_io_access_ops pxa310_ulpi_access_ops = { struct usb_phy_io_ops pxa310_ulpi_access_ops = { .read = pxa310_ulpi_read, .write = pxa310_ulpi_write, }; Loading Loading @@ -139,19 +139,19 @@ static int pxa310_start_otg_host_transcvr(struct usb_bus *host) pxa310_otg_transceiver_rtsm(); err = otg_init(u2d->otg); err = usb_phy_init(u2d->otg); if (err) { pr_err("OTG transceiver init failed"); return err; } err = otg_set_vbus(u2d->otg, 1); err = otg_set_vbus(u2d->otg->otg, 1); if (err) { pr_err("OTG transceiver VBUS set failed"); return err; } err = otg_set_host(u2d->otg, host); err = otg_set_host(u2d->otg->otg, host); if (err) pr_err("OTG transceiver Host mode set failed"); Loading Loading @@ -189,9 +189,9 @@ static void pxa310_stop_otg_hc(void) { pxa310_otg_transceiver_rtsm(); otg_set_host(u2d->otg, NULL); otg_set_vbus(u2d->otg, 0); otg_shutdown(u2d->otg); otg_set_host(u2d->otg->otg, NULL); otg_set_vbus(u2d->otg->otg, 0); usb_phy_shutdown(u2d->otg); } static void pxa310_u2d_setup_otg_hc(void) Loading
arch/arm/mach-tegra/include/mach/usb_phy.h +1 −1 Original line number Diff line number Diff line Loading @@ -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, Loading