如何使驱动同时适配4g和5g模块

当前使用5g模块rm520n-cn,驱动已经适配且可以正常使用网络。当前需要在已有驱动的基础上做添加,希望能同时适配ec200a这个型号的4g模块,不知道如何操作。
当前尝试在option.c中添加ec200a的vid和pid(搜索到可能是0x2c7c &0x6005 ),但是添加并重新编译后,识别依旧是失败了。
系统启动后的打印如下:
usb 1-1.3: new low-speed USB device number 5 using xhci-hcd

usb 1-1.3: device descriptor read/64, error -32

usb 1-1.3: device descriptor read/64, error -32

usb 1-1.3: new low-speed USB device number 6 using xhci-hcd

usb 1-1.3: device descriptor read/64, error -32

usb 1-1.3: device descriptor read/64, error -32

usb 1-1-port3: attempt power cycle

usb 1-1.3: new low-speed USB device number 7 using xhci-hcd

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: device not accepting address 7, error -71

usb 1-1.3: new low-speed USB device number 8 using xhci-hcd

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: device not accepting address 8, error -71

usb 1-1-port3: unable to enumerate USB device

usb 1-1.3: new low-speed USB device number 9 using xhci-hcd

usb 1-1.3: device descriptor read/64, error -32

usb 1-1.3: device descriptor read/64, error -32

usb 1-1.3: new low-speed USB device number 10 using xhci-hcd

usb 1-1.3: device descriptor read/64, error -32

usb 1-1.3: device descriptor read/64, error -32

usb 1-1-port3: attempt power cycle

usb 1-1.3: new low-speed USB device number 11 using xhci-hcd

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: device not accepting address 11, error -71

usb 1-1.3: new low-speed USB device number 12 using xhci-hcd

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: Device not responding to setup address.

usb 1-1.3: device not accepting address 12, error -71

usb 1-1-port3: unable to enumerate USB device

random: crng init done

请问正确修改驱动,使其能同时适配两个模块的驱动应该怎么修改呢?

上面的log打印,和option驱动应该无关。
大概率就是硬件原因。

你好,我当前是4g和5g模块使用的是同一个封装的同一个接口,仅更换了模块,主板和硬件部分均未发生改动,请问是否需要排查模块问题(例如更换同型号的4g模块,或者更换其他型号的4g模块)。
或者是否有可能是驱动未识别到当前4g模块,导致的以上报错呢?
如果我怀疑是驱动问题,请问仅在《option.c中添加ec200a的vid和pid》做这一步操作,是否可行呢?还是需要其他步骤呢?

和option.c 没有任何关系。即使没有加载option.c , USB设备应该都能正常识别到的。
两个模组接在同一个口上,要考虑

  1. 两个模组,尤其是增加了一个5G模组,相对耗电会高许多;
  2. USB 是高速总线,存在干扰;

好的,感谢你的帮助,我这边更换其他型号模块进行尝试,对比效果。