Access UART from kernel module without writing new low level driver for UART ? - Embedded

This is a discussion on Access UART from kernel module without writing new low level driver for UART ? - Embedded ; Hello, i want to access serial port (PC, other Linux based hardware) from a kernel module, but without writing a new low level driver. Is this possible ? Background: We have a device which is connected to the serial port. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Access UART from kernel module without writing new low level driver for UART ?

  1. Access UART from kernel module without writing new low level driver for UART ?

    Hello,

    i want to access serial port (PC, other Linux based hardware) from a kernel
    module, but without writing a new low level driver. Is this possible ?

    Background: We have a device which is connected to the serial port. We can
    access this device without problems from user space programmes via
    /dev/ttySx. But now, we want to move the control software into a kernel
    module. I don't think we can still use open, read, write to /dev/ttySx
    anymore.

    Regards,

    Martin



  2. Re: Access UART from kernel module without writing new low leveldriver for UART ?

    >I don't think we can still use open, read, write to /dev/ttySx
    > anymore.
    >


    I suppose you are right, as the Kernel Module performs a user/space
    Kernel/space transitions for any data transferred via the read / write
    interface. If it would be possible to use this interface from Kernel
    space data would need to be retransferred from/to Kernel space.

    I suppose your best bet is to use the serial port driver source code to
    create your own driver.

    -Michael

+ Reply to Thread