mirror of
https://github.com/Evolution-X-Devices/device_google_gs201
synced 2026-01-27 19:18:35 +00:00
b97e3d8cc4529f3ab32fb41e343319d3cd6efc5d
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
Description
Board tree for Google Tensor G2 devices
Languages
C++
60.5%
Makefile
25.6%
PureBasic
9.1%
Shell
2.1%
C
1.5%
Other
1.2%