Re: how can host disconnect a device without unplug

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

 



>> 1) In one of my embedded targets , host and device are hardwired over usb .
>> so i want to have programtic equivalent of unplug/plug cycle in usb
>> host  to check connect / disconnect
>> functionality and without using rmmod usb modules on host side . Also
>> i donot have control over gadget side .
>
> You could turn off power to the host.  That would have pretty much the
> effect you want.  But there's no other way to do it.
>

turn off power to the host ? sorry i didn't get it . is it meant to be
"turn off power to the device" ?
probably using some specifc  /sys/bus/usb/devices/.../power/xxx  file
, i can turn off power to device ?
or i need to use any other kernel api() or userspace interface to
achieve this  ?


>> 2) i want usb host to reenumerate the device .
>
> If you call usb_reset_device(), the host will read the device
> descriptors.  But it won't go through a complete re-enumeration unless
> the descriptors have changed from their original values.
>
> If you unbind the host controller from its driver and then rebind it,
> every device attached to that host controller will be re-enumerated.
> But the devices won't be disconnected from the host.
>
> Alan Stern
>

Thanx for the information .

Regards
Amit Nagal
--
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