Zend certified PHP/Magento developer

How do I determine how much power a USB device has negotiated?

I know that when a USB device first connects to a computer/hub it can only draw 100mA (150mA if it is USB 3.0). It must negotiate for higher power via a Configuration Descriptor’s bMaxPower field. The host may then select this configuration or select something lesser.

So, for example, a device may request 500mA, but it might only receive 300 (e.g. if there’s a hub that can’t provide more).

Is there a way (in Linux, preferably) to know the result of this negotiation? More specifically, if I’m developing an embedded device, I would like to know if I got my entire request or not. If I can’t get enough power for full functionality, I would like to reduce functionality or present an error to the user.

So far (using lsusb and the equivalent files under sysfs), I’ve only been able to find the amount requested, not the amount that’s been negotiated.