Re: is there a struct uart_driver like struct i2c_driver

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

 



On Mon, Aug 18, 2014 at 03:43:27PM +0200, Cestonaro Thilo wrote:
> Hey,
> 
> do I need to do something like:
> ----
> f = filp_open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY, 0600);
> fs=get_fs();
> set_fs(KERNEL_DS);
> ---
> Is there really no API for a uart attached device to communicate with it?
> 
> That would be the last thing I thought of :(.

Wait, you want to talk to a serial port from within the kernel?  No,
don't open the device node, just talk directly to the tty layer.  An
example of code that does this is some of the bluetooth layer.

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux