usb: gadget: consider link speed for bMaxPower
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 3 Dec 2012 19:07:05 +0000 (20:07 +0100)
committerFelipe Balbi <balbi@ti.com>
Thu, 10 Jan 2013 10:38:52 +0000 (12:38 +0200)
commit8f900a9a6e2691441ad763952d640ac44220e5dc
tree5f00b9cba299d1dfa035bf3dc13cb1029e39381a
parent98f3a1b90795d7216de0d56157868d174317f91a
usb: gadget: consider link speed for bMaxPower

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 renames bMaxPower to MaxPower and the various /2 and *2 are
removed. Before reporting the config descriptor, the proper value is
computer based on the speed, all in-tree users are updated. MaxPower is
also increased to u16 so we can store the nokia gadget value which is
larger than the max value allowed for u8.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/composite.c
drivers/usb/gadget/gmidi.c
drivers/usb/gadget/nokia.c
drivers/usb/gadget/webcam.c
include/linux/usb/composite.h
This page took 0.029118 seconds and 5 git commands to generate.