957b40b3b7
Android userspace UsbDeviceManager relies on the uevents generated by the composition driver to generate user notifications. Therefore, uevents will be generated whenever USB changes its state. This patch also add "state" attribute to android_device to show USB state. In addition, this patch adds android_create_function_device to create child function devices for USB gadget functions as well as android_remove_function_device to remove them. Android UsbDeviceManager relies on communicating to the devices created by the gadget functions to implement functions such as midi. Bug: 120441124 Bug: 317149848 Bug: 352124133 Change-Id: I471772a2514568dd7f2b2a0316a5f018b3b378ed Signed-off-by: Neill Kapron <nkapron@google.com> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com>
17 lines
693 B
Plaintext
17 lines
693 B
Plaintext
Android USB devices (eg. /sys/class/android_usb/android0/)
|
|
|
|
What: /sys/class/android_usb/<android_device>/state
|
|
Date: Feb 2024
|
|
Contact: Neill Kapron <nkapron@google.com>
|
|
Description:
|
|
The state of the USB connection. This attribute is likely
|
|
redundant with the /sys/class/UDC/state attribute, and should
|
|
be deprecated/removed when userspace can be refactored.
|
|
Change on the state will also generate uevent KOBJ_CHANGE on
|
|
the port with the new state included in the message as
|
|
"USB_STATE=<STATE>". Note this is not the correct usage of
|
|
uevents, but necessary due to the requirement to maintaine
|
|
userspace API compatibility.
|
|
|
|
Valid values: CONNECTED, DISCONNECTED, CONFIGURED
|