Device node at /dev/tty* not getting created for uart serial driver
I have written a simple UART serial driver in embedded Linux running busybox with mdev rules. I have provided .dev_name as "ttyC2C" in my driver code. static struct uart_driver serial_omap_reg = { .owner = THIS_MODULE, .driver_name = "Omap-C2C-Serial", .dev_name = "ttyC2C", .nr = OMAP_MAX_HSUART_PORTS, .cons = NULL, }; However the node is getting created in ./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0 ./sys/class/tty/ttyC2C0 / # ls -l ./sys/class/tty/ttyC2C0 lrwxrwxrwx 1 root 0 0 Jan 1 00:14 ./sys/class/tty/ttyC2C0 -> ../../devices/platform/omap_c2c_uart.0/tty/ttyC2C0 / # ls -l ./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0 -r--r--r-- 1 root 0 4096 Jan 1 00:14 dev lrwxrwxrwx 1 root 0 0 Jan 1 00:14 device -> ../../../omap_c2c_uart.0 drwxr-xr-x 2 root 0 0 Jan 1 00:14 power lrwxrwxrwx 1 root 0 0 Jan 1 00:14 subsystem -> ../../../../../class/tty -rw-r--r-- 1 root 0 4096 Jan 1 00:14 uevent / # The mdev rules for tty are: tty 0:5 0666 tty.* 0:0 0620 How to get device node as /dev/ttyC2C ? -- Manavendra Nath Manav
Hi RK On Sat, Nov 24, 2012 at 2:03 PM, Manavendra Nath Manav <mnm.kernel@gmail.com
wrote:
I have written a simple UART serial driver in embedded Linux running busybox with mdev rules. I have provided .dev_name as "ttyC2C" in my driver code.
static struct uart_driver serial_omap_reg = { .owner = THIS_MODULE, .driver_name = "Omap-C2C-Serial", .dev_name = "ttyC2C", .nr = OMAP_MAX_HSUART_PORTS, .cons = NULL, };
However the node is getting created in
./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0 ./sys/class/tty/ttyC2C0
/ # ls -l ./sys/class/tty/ttyC2C0 lrwxrwxrwx 1 root 0 0 Jan 1 00:14 ./sys/class/tty/ttyC2C0 -> ../../devices/platform/omap_c2c_uart.0/tty/ttyC2C0
/ # ls -l ./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0 -r--r--r-- 1 root 0 4096 Jan 1 00:14 dev lrwxrwxrwx 1 root 0 0 Jan 1 00:14 device -> ../../../omap_c2c_uart.0 drwxr-xr-x 2 root 0 0 Jan 1 00:14 power lrwxrwxrwx 1 root 0 0 Jan 1 00:14 subsystem -> ../../../../../class/tty -rw-r--r-- 1 root 0 4096 Jan 1 00:14 uevent / #
The mdev rules for tty are:
tty 0:5 0666 tty.* 0:0 0620
How to get device node as /dev/ttyC2C ? -- Manavendra Nath Manav
can you help me on following issue? -- Manavendra Nath Manav
On Sat, Nov 24, 2012 at 2:20 PM, Manavendra Nath Manav <mnm.kernel@gmail.com
wrote:
Hi RK
On Sat, Nov 24, 2012 at 2:03 PM, Manavendra Nath Manav < mnm.kernel@gmail.com> wrote:
I have written a simple UART serial driver in embedded Linux running busybox with mdev rules. I have provided .dev_name as "ttyC2C" in my driver code.
static struct uart_driver serial_omap_reg = { .owner = THIS_MODULE, .driver_name = "Omap-C2C-Serial", .dev_name = "ttyC2C", .nr = OMAP_MAX_HSUART_PORTS, .cons = NULL, };
However the node is getting created in
./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0 ./sys/class/tty/ttyC2C0
/ # ls -l ./sys/class/tty/ttyC2C0 lrwxrwxrwx 1 root 0 0 Jan 1 00:14 ./sys/class/tty/ttyC2C0 -> ../../devices/platform/omap_c2c_uart.0/tty/ttyC2C0
/ # ls -l ./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0 -r--r--r-- 1 root 0 4096 Jan 1 00:14 dev lrwxrwxrwx 1 root 0 0 Jan 1 00:14 device -> ../../../omap_c2c_uart.0 drwxr-xr-x 2 root 0 0 Jan 1 00:14 power lrwxrwxrwx 1 root 0 0 Jan 1 00:14 subsystem -> ../../../../../class/tty -rw-r--r-- 1 root 0 4096 Jan 1 00:14 uevent / #
The mdev rules for tty are:
tty 0:5 0666 tty.* 0:0 0620
How to get device node as /dev/ttyC2C ? -- Manavendra Nath Manav
can you help me on following issue?
-- Manavendra Nath Manav
In "Essential Linux Device Drivers" book, it says that that the driver name in "struct platform_driver" and "struct uart_driver" should be same. I modified the code according but still /dev/ttyC2C node is not being populated. -- Manavendra Nath Manav
participants (1)
-
Manavendra Nath Manav