Re: UART driver development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 10, 2014 at 04:20:27PM +0200, Adrien PEYROUTY wrote:
> Hello all,
> 
> I am currently working on a UART driver for linux.

For what specific UART and platform?

> I am developping a new architecture on which I have 3 uart ports.

3 different uarts on what type of bus?

> In this architecture, I know that there will be 3 UARTs, and this
> driver has to be compiled with the kernel, it mustn't be a module
> driver.

That shouldn't matter to your code at all.

> The exact thing I want to do is :
> 
> 1) use the first uart as console for the kernel, and for the shell at
> the end of the boot process

That is up to userspace to decide, not your driver.

> 2) develop a UART driver for the two others UART port so that the user
> can access them from /dev/ttyS1 and /dev/ttyS2

Again, your driver shouldn't care at all for what it is used for, that
is up to userspace to decide.

> I am really confused. What need I to do ? I read lots of documentation
> on both the web and on some books, but I still don't understand what
> is a uart_driver, a tty_driver, a platform_driver or even a line
> discipline.

It's not a trivial driver to write as your first driver at all.

Again, your hardware will dictate what type of driver to write.

And stay away from a line discipline, you don't need to write a new one
of those.

> How to register the right driver to make it appear on /dev ?

What did you try?  Pointers to your code anywhere?

> When the user will open the file descriptor in /dev and complete some
> operations like write, read or ioctl on this file, which function will
> be called in my driver ?

Depends on what type of driver you write.  serial or tty?

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux