Hi,
I am using Colibri iMX6 with all 5 serial ports enabled in device tree. All UARTs just have receive and transmit lines.
We have an application where I need to disconnect and reconnect the serial port device. I am using poll() to monitor events on one of the serial ports (UART 5 to be specific). Whenever I press a key on serial device I get a POLLIN event. We are not using any interrupt service routine on the serial port as of now.
I have the following questions:
- Is there any way that I could detect the device being unplugged/plugged from the UART port?
- One more issue I am facing is that after I unplug the serial device and connect it back again, the serial device is dead (it is powered but not able to read events from device).
This makes me wonder if it is the application or the IMX-Serial driver that is responsible for not reading the events?
Thanks