Re: Ability to limit to 100mA and/or disable USB power entirely

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Apr 9, 2012 at 10:14 AM, James Haigh <james.r.haigh@xxxxxxxxx> wrote:
> Hello.
>
> I've been told this is the right place to ask, correct me if I'm wrong.
>
> I don't think the ability to limit a port to 100mA current draw is
> exposed by the drivers. The use-case for this is to avoid a battery
> powered device such as a phone from draining the battery of a laptop
> while travelling. Data transfer is all that's needed here. It is also
> wasteful to charge one battery from another.
>
> In the interests of saving energy, and prolonging battery-life, please
> could a mechanism to restrict to 100mA be implemented. I could then
> set up an automatic ACPI response to AC power to allow 500mA and
> charge the phone, but battery-to-battery transfer is inefficient and
> should be avoided.

I am not so sure if this is feasible as there are many non-compliant
USB hub and non-compliant USB device out there and Linux needs
to support them.
http://en.wikipedia.org/wiki/USB_hub

> Apparently USB ports can be disabled, and when this occurs no power is
> supplied. However, I think the ability to disable a port is also not
> exposed by the USB drivers.

You can suspend a port.
http://www.mjmwired.net/kernel/Documentation/usb/power-management.txt

> There are many use-cases for this. In the interest of saving
> electricity, it is desirable to unplug unused devices. USB ports can
> be plugged only about 1500 times before they ware out, and sometimes
> the ports are fairly inaccessible behind the base unit of a computer.
> Some badly designed devices will often need resetting by physically
> replugging. If a USB device is plugged into a host device that is
> remotely monitored, it is not possible to physically reconnect the
> device. A less serious and more fun use-case is the automation of USB
> 'decorations', which simply use the 5V power supply.

Or this crazy USB Hub based AVR programmer.
http://www.pjrc.com/hub_isp/

> It seems an oversight that USB devices cannot be programmatically
> disconnected and reconnected in GNU/Linux OSes. I would appreciate it
> if they could, if possible, and I know for sure that others would too.

Maybe you should read this and then see if the current implementations
meet your needs.
http://www.mjmwired.net/kernel/Documentation/usb/power-management.txt

> It has been suggested that I should send a patch in, but I am no
> kernel or driver developer, and I'm better off contributing to Free
> software projects that are achievable at my skill-level. If you want
> me to file these 2 issues/feature-requests somewhere, tell me where
> and I will.
>



-- 
Xiaofan
--
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


B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux