<br><div class="gmail_extra"><div class="gmail_quote">On Sat, Nov 24, 2012 at 2:20 PM, Manavendra Nath Manav <span dir="ltr"><<a href="mailto:mnm.kernel@gmail.com" target="_blank">mnm.kernel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi RK<br><br><div class="gmail_extra"><div><div class="h5">
<div class="gmail_quote">On Sat, Nov 24, 2012 at 2:03 PM, Manavendra Nath Manav <span dir="ltr"><<a href="mailto:mnm.kernel@gmail.com" target="_blank">mnm.kernel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
<p>I have written a simple UART serial driver in embedded Linux running busybox with mdev rules. I have provided <code>.dev_name</code> as "<code>ttyC2C</code>" in my driver code.</p>
<pre><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,
};
</code></pre>
<p>However the node is getting created in</p>
<pre><code>./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
/ #
</code></pre>
<p>The mdev rules for tty are:</p>
<pre><code>tty 0:5 0666
tty.* 0:0 0620
</code></pre>
<p>How to get device node as <code>/dev/ttyC2C</code> ?</p><span><font color="#888888">
</font></span></div><span><font color="#888888">-- <br>Manavendra Nath Manav<br>
</font></span></blockquote></div><br></div></div>can you help me on following issue?<span class=""><font color="#888888"><br clear="all"><br>-- <br>Manavendra Nath Manav<br>
</font></span></div>
</blockquote></div><br><span style="color:rgb(68,68,68);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">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.</span><br clear="all">
<div><br></div>-- <br>Manavendra Nath Manav<br>
</div>