Hi, all.
Could you, please, help me?
I want to write a linux-driver for a device connected to computer over a
serial port to access it through /dev/mydev, but i'm not sure how to do
it. I mean, i can access my device from user-mode program, setting
termios structure and working with device through file /dev/ttySx.
1. But how can i in kernel-mode open /dev/ttySx, setup termios and
read/write?
2. Should i use some kernel functions to do it or i shouldn't use
termios and have to program harware ports (such as 0x3F8 etc) using
inb/outb?
3. If i should program harware ports then how can i disable native linux
serial driver (couse when my driver and linux driver will exist together
they won't work, i think)?
4. And is there any way to use native linux serial driver from my driver
to open serial port and read/write it?
Thank you in advance.
Mihail.
-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html