TX2 usb working on devices mode,how to get hotplug status?

Hello everyone,

I want to know do we have any way to get the hotplug status when usb working on the device mode(not host),like mass storage/ethernet etc.

We don’t have expertise on this functionality. Other users may share their experience.

The ID pin obviously works since the samples in “/opt/” work when a type-B connector is inserted, and also devices work when a type-A connector is inserted. The trouble is that I don’t know where this might be exported in “/sys/” because gadget knows what is there from within the kernel itself. It is my assumption you want to know from user space, but I could be wrong. Are you wanting to know the status of the ID pin from user space or from kernel space? I may not be able to answer, but without knowing this, then I doubt anyone will answer. Possibly the ID pin is nothing but GPIO, but I have not researched that.