Skip to content

Commit

Permalink
Merge tag 'fixes-for-v3.13-rc4' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.13-rc4

DWC3 learned that it can't resume a PHY which wasn't
initialized and it also learned to not leave PHY powered
up in case of an error.

twl6030-usb PHY driver got a fix for a signedness bug in
twl6030_readb().

Tegra PHY driver got a bug fix where it could return success
even though there was an error.

Signed-of-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Greg Kroah-Hartman committed Dec 9, 2013
2 parents 2d51f3c + 851dd02 commit 757de81
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ static int dwc3_probe(struct platform_device *pdev)
if (IS_ERR(regs))
return PTR_ERR(regs);

usb_phy_set_suspend(dwc->usb2_phy, 0);
usb_phy_set_suspend(dwc->usb3_phy, 0);

spin_lock_init(&dwc->lock);
platform_set_drvdata(pdev, dwc);

Expand Down Expand Up @@ -488,6 +485,9 @@ static int dwc3_probe(struct platform_device *pdev)
goto err0;
}

usb_phy_set_suspend(dwc->usb2_phy, 0);
usb_phy_set_suspend(dwc->usb3_phy, 0);

ret = dwc3_event_buffers_setup(dwc);
if (ret) {
dev_err(dwc->dev, "failed to setup event buffers\n");
Expand Down Expand Up @@ -569,6 +569,8 @@ static int dwc3_probe(struct platform_device *pdev)
dwc3_event_buffers_cleanup(dwc);

err1:
usb_phy_set_suspend(dwc->usb2_phy, 1);
usb_phy_set_suspend(dwc->usb3_phy, 1);
dwc3_core_exit(dwc);

err0:
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/phy/phy-tegra-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy,

tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (!tegra_phy->regs) {
if (!tegra_phy->pad_regs) {
dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
return -ENOMEM;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/phy/phy-twl6030-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ static inline int twl6030_writeb(struct twl6030_usb *twl, u8 module,

static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
{
u8 data, ret = 0;
u8 data;
int ret;

ret = twl_i2c_read_u8(module, &data, address);
if (ret >= 0)
Expand Down

0 comments on commit 757de81

Please sign in to comment.