Re: how can host disconnect a device without unplug

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

 



On Tue, 14 Jun 2011, Amit Nagal wrote:

> Hi ,
> 
> 
> How can a usb host  disconnect a usb device without unplug of usb cable ?

What exactly do you mean by "disconnect"?

> for eg i mean something similar to usb_gadget_disconnect() api
> available on gadget side .

That API causes the gadget to remove its terminations and pullup 
resistors from the bus data lines.  Nothing the host does can cause 
that to happen.

> can usb host also actually disconnect a usb device at will without
> cable unplug ?

This is the same as the question you asked above.

> is it possible to do entirely in software or support from hardware
> also is required ?

Again, it depends on what you mean by "disconnect".

> what interfaces in userspace or kernel can be used if possible ?

There's the /sys/bus/usb/devices/.../remove attribute file.  Writing to 
this file is roughly equivalent to pressing the "Safely remove 
hardware" button in Windows.  But it isn't like physically unplugging 
the USB cable.

Alan Stern

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


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

  Powered by Linux