Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3673
b: refs/heads/master
c: bc96c0a
h: refs/heads/master
i:
  3671: 16fb0f0
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jun 27, 2005
1 parent 6a44ddc commit 0f6b934
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2532178a68b5ce4e421d50ea1b1dcc0a1359f19d
refs/heads/master: bc96c0ad1ed0c938fefc0423aa99f086c5a2a1ea
6 changes: 3 additions & 3 deletions trunk/drivers/usb/gadget/dummy_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,9 @@ static int dummy_start (struct usb_hcd *hcd)
if (!root)
return -ENOMEM;

/* only show a low-power port: just 8mA */
hcd->power_budget = 8;

/* root hub enters addressed state... */
hcd->state = HC_STATE_RUNNING;
root->speed = USB_SPEED_HIGH;
Expand All @@ -1655,9 +1658,6 @@ static int dummy_start (struct usb_hcd *hcd)
goto err1;
}

/* only show a low-power port: just 8mA */
hub_set_power_budget (root, 8);

if ((retval = dummy_register_udc (dum)) != 0)
goto err2;

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,6 @@ static int ohci_run (struct ohci_hcd *ohci)
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
return -ENODEV;
}
if (ohci->power_budget)
hub_set_power_budget(udev, ohci->power_budget);

register_reboot_notifier (&ohci->reboot_notifier);
create_debug_files (ohci);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/host/ohci-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)
if (config->otg) {
ohci_to_hcd(ohci)->self.otg_port = config->otg;
/* default/minimum OTG power budget: 8 mA */
ohci->power_budget = 8;
ohci_to_hcd(ohci)->power_budget = 8;
}

/* boards can use OTG transceivers in non-OTG modes */
Expand Down Expand Up @@ -230,7 +230,7 @@ static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)

/* TPS2045 switch for internal transceiver (port 1) */
if (machine_is_omap_osk()) {
ohci->power_budget = 250;
ohci_to_hcd(ohci)->power_budget = 250;

rh &= ~RH_A_NOCP;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/host/ohci.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ struct ohci_hcd {
* other external transceivers should be software-transparent
*/
struct otg_transceiver *transceiver;
unsigned power_budget;

/*
* memory management for queue data structures
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/usb/host/sl811-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,18 +1574,17 @@ sl811h_start(struct usb_hcd *hcd)
udev->speed = USB_SPEED_FULL;
hcd->state = HC_STATE_RUNNING;

if (sl811->board)
if (sl811->board) {
hcd->can_wakeup = sl811->board->can_wakeup;
hcd->power_budget = sl811->board->power * 2;
}

if (usb_hcd_register_root_hub(udev, hcd) != 0) {
usb_put_dev(udev);
sl811h_stop(hcd);
return -ENODEV;
}

if (sl811->board && sl811->board->power)
hub_set_power_budget(udev, sl811->board->power * 2);

/* enable power and interupts */
port_power(sl811, 1);

Expand Down

0 comments on commit 0f6b934

Please sign in to comment.