Opening a /dev file from Kernel space



Hi,
I want to open the serilal driver (/dev/ttyS0) from the kernel space.
I need to write a character driver in the kernel (the requirements of
the project insist that it will be inside the kernel) that gets special
strings from user and pass them to the serial.

In order to implement that I thought of opening the serial driver as if
I was a user and with the file descriptor to read()/write()/ioctl()
etc...

Can I do this from the kernel space?
Do you have maybe a better idea how to implement?

Thanks
Hagit

.



Relevant Pages

  • Re: kernel source install
    ... Different versions of the wireless tools were used to compile the driver ... Unless you configure the interface to be WEP/WPA ...
    (Fedora)
  • Communication with PCIe device; reading/writing hw registers
    ... I'm fairly new to driver development, but I am supposed to write a driver ... In Linux it is done in such a way that all the device's registers are mapped ... user space and kernel space? ... handle from kernel space to user space, which will allow me to work with the ...
    (microsoft.public.development.device.drivers)
  • sparc ffb drm driver...
    ... This driver is broken and has been since my first CVS merge went in back ... there is no current user space to go with the kernel space driver (Mesa ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: sparc ffb drm driver...
    ... > b) there is no current user space to go with the kernel space driver (Mesa ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Opening a file from Kernel space
    ... I want to open the serilal driver from the kernel space. ... In order to implement that I thought of opening the serial driver as if ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)