From: gutter <gutter@bk.ru>
To: linux-c-programming@vger.kernel.org
Subject: Working with COM-port from kernel module
Date: Wed, 26 Apr 2006 11:16:45 +1100 [thread overview]
Message-ID: <444EBBED.8060203@bk.ru> (raw)
Hi, all.
Could you, please, help me?
I want to write a linux-driver for a device connected to computer over a
serial port to access it through /dev/mydev, but i'm not sure how to do
it. I mean, i can access my device from user-mode program, setting
termios structure and working with device through file /dev/ttySx.
1. But how can i in kernel-mode open /dev/ttySx, setup termios and
read/write?
2. Should i use some kernel functions to do it or i shouldn't use
termios and have to program harware ports (such as 0x3F8 etc) using
inb/outb?
3. If i should program harware ports then how can i disable native linux
serial driver (couse when my driver and linux driver will exist together
they won't work, i think)?
4. And is there any way to use native linux serial driver from my driver
to open serial port and read/write it?
Thank you in advance.
Mihail.
reply other threads:[~2006-04-26 0:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=444EBBED.8060203@bk.ru \
--to=gutter@bk.ru \
--cc=linux-c-programming@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).