I am using kernel version 220.127.116.11.0.1 with imx6solosabresd custom board.
Until now, I could use USB gadget serial very well.. but I am faced with new usb issue.
while using usb gadget serial, if I pull the usb cable out from the usb port, USB will not recognize that usb cable is not connected.
As below, I am using the below modules and fsl-imx-fb image.
I found the solution as below.
1. After disconnecting the usb cable, I did "rmmod g_serial.ko".
2. After connecting the usb cable, I did "insmod g_serial.ko"
But, I would like the custom board to do insmod and rmmod itself when the usb cable is connected or not.
So, I made udev rule in /etc/udev/rules.d/10-local.rules
ACTION=="add", KERNEL=="ttyGS0", SUBSYSTEM=="tty", RUN+="/etc/udev/rules.d/automount.sh"
ACTION=="remove", KERNEL=="ttyGS0", SUBSYSTEM=="tty", RUN+="/etc/udev/rules.d/autounmount.sh"
in automount.sh file,
in autounmount.sh file,
But, it is not working. ㅜ.ㅜ
I need your help..