From: Cestonaro Thilo <thilo.cestonaro@ts.fujitsu.com>
To: Greg KH <greg@kroah.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: is there a struct uart_driver like struct i2c_driver
Date: Mon, 18 Aug 2014 16:56:24 +0200 [thread overview]
Message-ID: <53F21418.80307@ts.fujitsu.com> (raw)
In-Reply-To: <20140818135046.GA927@kroah.com>
On 18.08.2014 15:50, Greg KH wrote:
> 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
>
From the hci_uart stuff I got to the conclusion that I need to implement
a tty line discipline driver and change the corresponding tty's line
discipline
to my own one.
Is this the best way or did I miss something? I ask again, cause writing
a tty line discipline
looks rather complicate then straight forward and before I start doing it,
I want to be sure to not run against a wall :).
Cheers,
Thilo
next prev parent reply other threads:[~2014-08-18 14:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 9:54 is there a struct uart_driver like struct i2c_driver Cestonaro Thilo
2014-08-18 10:53 ` Greg KH
2014-08-18 11:11 ` Cestonaro Thilo
2014-08-18 11:19 ` Cestonaro Thilo
2014-08-18 13:43 ` Cestonaro Thilo
2014-08-18 13:50 ` Greg KH
2014-08-18 14:56 ` Cestonaro Thilo [this message]
2014-08-18 15:07 ` Greg KH
2014-08-19 12:25 ` Cestonaro Thilo
2014-08-19 12:39 ` Greg KH
2014-08-19 12:45 ` Cestonaro Thilo
2014-08-25 14:57 ` Greg KH
2014-08-18 16:19 ` Grant Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F21418.80307@ts.fujitsu.com \
--to=thilo.cestonaro@ts.fujitsu.com \
--cc=greg@kroah.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).