Serial driver in-band control message

Ramon Fried ramon.fried at tandemg.com
Wed Apr 20 18:27:27 EDT 2016


Hi.
I'm developing a driver for a rather weird serial controller hardware.
The HW allows the host to put it in low power state.
The command for entering low power is an ASCII message sent in-band.

Till now, I used a user-space application to open the TTY port and send the command through it.
This is not acceptable solution as the device needs to be put in low power mode by its driver in the kernel.

I didn't find any example or reference on how to write characters to the serial device, or how to open and write to the  TTY device from the kernel space.
I guess this is discouraged. Do I have any other options to do so from the kernel space ?

Warm regards,
Ramon



More information about the Kernelnewbies mailing list