Accessing serial ports from kernel module

Nov 03, 2003 2 Replies

I am writing a device driver for a PC104 card that controls some equipment. This equipment also has a serial port, which needs to work in concert with the PC104 card.



Is there an easy way to open the device file directly from the kernel module?



I can initialize the line before installing the driver, as part of my insmod script.


Kernel code in linux-2.4.x/init/main.c:625 does a straight open() call to open the initial console before exec'ing init - so can you simply do open("/dev/ttyS0",O_RDWR,0) or whatever in your driver?

Regards,

John

I'm running a 2.2 kernel, and can't find any documentation on concat. Is that a kernel function? Where does it come from?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required