Linux kernel musb驱动的细节问题 远程兼职
一般月薪3000元- 项目类型:不用选择
- 每月工作: 3天
- 工作方式:远程
职位详情
请解决Linux kernel usb musb驱动ARM板子通过USB唤醒Ubuntu台式机的细节问题
ARM Linux板子的内核是:4.14.52
1)将ARM Linux板子通过USB连接Ubuntu 16.04.x台式机
2)睡眠台式机
3)在板子上运行下面的命令,检查suspended状态,应该为 1:
cat /sys/devices/platform/soc/1c19000.usb/musb-hdrc.4.auto/gadget/suspended
4)在板子上运行下面的命令,唤醒台式机
echo 1 > /sys/devices/platform/soc/1c19000.usb/musb-hdrc.4.auto/udc/musb-hdrc.4.auto/srp
5)台式机被唤醒后,suspended状态应该为 0。问题是:仍然显示为 1:
cat /sys/devices/platform/soc/1c19000.usb/musb-hdrc.4.auto/gadget/suspended
6)当用连接台式机的键盘作为唤醒源,唤醒台式机的时候,没有这个问题
USB spec: 9.1.1.6 Suspended
Bus activity may cease due to the host entering a suspend mode of its own.
In addition, a USB device shall also enter the Suspended state when the hub port it is attached to is disabled. This is referred to as selective suspend.
A USB device exits suspend mode when there is bus activity. A USB device may also request the host to exit suspend mode or selective suspend by using electrical signaling to indicate remote wakeup. The ability of a device to signal remote wakeup is optional. If a USB device is capable of remote wakeup signaling, the device must support the ability of the host to enable and disable this capability. When the device is reset, remote wakeup signaling must be disabled.