device_google_gs101/usb
Roy Luo 381adb1243 Usb: Listen to USB sysfs attribute for device state
Poll the sysfs attributes that represents usb device state in
either of the following states: not attached, powered, default,
addressed, configured.
The information is useful in detecting non compliant USB cable,
which will be supported in later patch sets. This patch lays
the ground work to monitor the sysfs attributes in both device
and host modes.
The thread to poll uevent is re-used to poll sysfs because this
serialize type-C port events and usb device state changes, hence
prevent potential races.
Added a thin abstration layer and a map to keep epoll data so
that it's easier to dynamically add/delete files to epoll, which
is needed for usb devices in host mode.

Bug: 285199434
Test: trigger usb device state changes in device and host mode
Change-Id: Ie5389d051deb28dbb486c2f27319b3cc9e89312f
2023-08-23 19:38:58 +00:00
..
gadget Add resetCb 2023-02-09 02:02:50 +00:00
usb Usb: Listen to USB sysfs attribute for device state 2023-08-23 19:38:58 +00:00