Skip to content

Commit

Permalink
Merge tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…gregkh/usb

Pull USB merge for 3.4-rc1 from Greg KH:
 "Here's the big USB merge for the 3.4-rc1 merge window.

  Lots of gadget driver reworks here, driver updates, xhci changes, some
  new drivers added, usb-serial core reworking to fix some bugs, and
  other various minor things.

  There are some patches touching arch code, but they have all been
  acked by the various arch maintainers."

* tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (302 commits)
  net: qmi_wwan: add support for ZTE MF820D
  USB: option: add ZTE MF820D
  usb: gadget: f_fs: Remove lock is held before freeing checks
  USB: option: make interface blacklist work again
  usb/ub: deprecate & schedule for removal the "Low Performance USB Block" driver
  USB: ohci-pxa27x: add clk_prepare/clk_unprepare calls
  USB: use generic platform driver on ath79
  USB: EHCI: Add a generic platform device driver
  USB: OHCI: Add a generic platform device driver
  USB: ftdi_sio: new PID: LUMEL PD12
  USB: ftdi_sio: add support for FT-X series devices
  USB: serial: mos7840: Fixed MCS7820 device attach problem
  usb: Don't make USB_ARCH_HAS_{XHCI,OHCI,EHCI} depend on USB_SUPPORT.
  usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
  USB: ohci-nxp: Remove i2c_write(), use smbus
  USB: ohci-nxp: Support for LPC32xx
  USB: ohci-nxp: Rename symbols from pnx4008 to nxp
  USB: OHCI-HCD: Rename ohci-pnx4008 to ohci-nxp
  usb: gadget: Kconfig: fix typo for 'different'
  usb: dwc3: pci: fix another failure path in dwc3_pci_probe()
  ...
  • Loading branch information
torvalds committed Mar 20, 2012
2 parents 843ec55 + 11207b6 commit ed378a5
Show file tree
Hide file tree
Showing 269 changed files with 9,689 additions and 5,607 deletions.
11 changes: 11 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-usb
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
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.
11 changes: 11 additions & 0 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -524,3 +524,14 @@ Files: arch/arm/mach-at91/at91cap9.c
Why: The code is not actively maintained and platforms are now hard to find.
Who: Nicolas Ferre <[email protected]>
Jean-Christophe PLAGNIOL-VILLARD <[email protected]>

----------------------------

What: Low Performance USB Block driver ("CONFIG_BLK_DEV_UB")
When: 3.6
Why: This driver provides support for USB storage devices like "USB
sticks". As of now, it is deactivated in Debian, Fedora and
Ubuntu. All current users can switch over to usb-storage
(CONFIG_USB_STORAGE) which only drawback is the additional SCSI
stack.
Who: Sebastian Andrzej Siewior <[email protected]>
6 changes: 3 additions & 3 deletions Documentation/i2c/instantiating-devices
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ it may have different addresses from one board to the next (manufacturer
changing its design without notice). In this case, you can call
i2c_new_probed_device() instead of i2c_new_device().

Example (from the pnx4008 OHCI driver):
Example (from the nxp OHCI driver):

static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };

static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev)
{
(...)
struct i2c_adapter *i2c_adap;
Expand All @@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
(...)
i2c_adap = i2c_get_adapter(2);
memset(&i2c_info, 0, sizeof(struct i2c_board_info));
strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
strlcpy(i2c_info.type, "isp1301_nxp", I2C_NAME_SIZE);
isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
normal_i2c, NULL);
i2c_put_adapter(i2c_adap);
Expand Down
24 changes: 15 additions & 9 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_otg *otg, bool on)
{
if (on)
gpio_set_value(USBH1_VBUSEN_B, 0);
Expand All @@ -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))
Expand Down
24 changes: 15 additions & 9 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_otg *otg, bool on)
{
if (on)
gpio_set_value(USBH1_VBUSEN_B, 0);
Expand All @@ -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))
Expand Down
20 changes: 10 additions & 10 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 All @@ -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,
};
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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)
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
4 changes: 2 additions & 2 deletions arch/arm/mach-tegra/usb_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,13 @@ static int ulpi_phy_power_on(struct tegra_usb_phy *phy)
writel(val, base + ULPI_TIMING_CTRL_1);

/* Fix VbusInvalid due to floating VBUS */
ret = otg_io_write(phy->ulpi, 0x40, 0x08);
ret = usb_phy_io_write(phy->ulpi, 0x40, 0x08);
if (ret) {
pr_err("%s: ulpi write failed\n", __func__);
return ret;
}

ret = otg_io_write(phy->ulpi, 0x80, 0x0B);
ret = usb_phy_io_write(phy->ulpi, 0x80, 0x0B);
if (ret) {
pr_err("%s: ulpi write failed\n", __func__);
return ret;
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
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/ulpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#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;
}
#endif

extern struct otg_io_access_ops mxc_ulpi_access_ops;
extern struct usb_phy_io_ops mxc_ulpi_access_ops;

#endif /* __MACH_ULPI_H */

8 changes: 4 additions & 4 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 All @@ -106,13 +106,13 @@ static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg)
return ulpi_poll(view, ULPIVW_RUN);
}

struct otg_io_access_ops mxc_ulpi_access_ops = {
struct usb_phy_io_ops mxc_ulpi_access_ops = {
.read = ulpi_read,
.write = ulpi_write,
};
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);
}
Loading

0 comments on commit ed378a5

Please sign in to comment.