On Mon, 17 Dec 2012, Sebastian Andrzej Siewior wrote: > The USB 2.0 specification says that bMaxPower is the maximum power > consumption expressed in 2 mA units and the USB 3.0 specification says > that it is expressed in 8 mA units. > This patch adds a helper function usb_get_max_power() which computes the > value based on config & usb_device's speed value. The sysfs interface & > the device descriptor dump compute the value on their own. > > Cc: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> > --- > v2..v3: use usb_get_max_power() in sysfs code. (but the patch description wasn't updated along with the code) Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html