Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: chipidea: add power_budget limit for ehci to platform data

Some implementations need this limitation to work correctly.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexander Shishkin and committed by
Greg Kroah-Hartman
bd841986 eb70e5ab

+10 -1
+7 -1
drivers/usb/chipidea/ci13xxx_pci.c
··· 33 33 .capoffset = 0, 34 34 }; 35 35 36 + struct ci13xxx_udc_driver penwell_pci_driver = { 37 + .name = UDC_DRIVER_NAME, 38 + .capoffset = 0, 39 + .power_budget = 200, 40 + }; 41 + 36 42 /** 37 43 * ci13xxx_pci_probe: PCI probe 38 44 * @pdev: USB device controller being probed ··· 159 153 }, 160 154 { 161 155 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0829), 162 - .driver_data = (kernel_ulong_t)&langwell_pci_driver, 156 + .driver_data = (kernel_ulong_t)&penwell_pci_driver, 163 157 }, 164 158 { 0, 0, 0, 0, 0, 0, 0 /* end: all zeroes */ } 165 159 };
+2
drivers/usb/chipidea/host.c
··· 116 116 hcd->regs = ci->hw_bank.abs; 117 117 hcd->has_tt = 1; 118 118 119 + hcd->power_budget = ci->udc_driver->power_budget; 120 + 119 121 ehci = hcd_to_ehci(hcd); 120 122 ehci->caps = ci->hw_bank.cap; 121 123 ehci->has_hostpc = ci->hw_bank.lpm;
+1
include/linux/usb/chipidea.h
··· 10 10 const char *name; 11 11 /* offset of the capability registers */ 12 12 uintptr_t capoffset; 13 + unsigned power_budget; 13 14 unsigned long flags; 14 15 #define CI13XXX_REGS_SHARED BIT(0) 15 16 #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1)