Re: Usb_power_supply

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

 



On Thu, Apr 02, 2020 at 09:19:06AM +0200, massimo wrote:
> I've read the interesting Greg's article about writing USB driver for
> Linux.
> I'm interested in a simpler question. Is it possible
> to write a driver in Ubuntu (19.10) to switch power on or off to a USB
> port, that' s to say to give or take off the 5 volts power supply  to a
> USB port (in order for example to switch on or off a simple usb lamp)?
> Thanks for your attention and courtesy, Massimo.
> 

Try the userspace program 'usbreset' that is part of the usbutils
package, and can be found also here:
	https://github.com/gregkh/usbutils/blob/master/usbreset.c

if your hub supports it, this will work.  Note, not all USB hubs support
this type of behavior, as it is not required by the USB specification.

hope this helps,

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux