摄像头为罗技USB2.0高速。驱动使用UVC,选择V4L2。
加载设备,会动态创建/dev/vedio0设备。运行测试程序,probe成功。open失败。
open video device failure: Device or resource busy
130.895874] hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad?
分析处理:
probe()---->usb_enable_autosuspend(udev)使能自动挂起
open()---->v4L2_open---->uvc_v4l2_open---->usb_autopm_get_interface----->pm_runtime_get_sync电源管理;
处理方法:
驱动USB AUTOSURPEND AND WAKEUP FUNCTION;
make menuconfig
[ ]USB runtime power management (autosuspend) and wakeup