From: oliver.graute@gmail.com (Oliver Graute)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Writing a Line discpline driver to talk to a stm32 controller
Date: Fri, 23 Mar 2018 09:18:14 +0100 [thread overview]
Message-ID: <20180323081814.GA12062@graute-opti> (raw)
Hello list,
I have a imx6ul connected to a stm32 controller via a serial interface. I need
to implement a little protocol to talk towards the stm32 controller for send
and receive ontop of the serial line. I found out that I have to write my own
line discpline driver for doing this. After digging around in drivers/tty/n_*
I have a little idea what to do here. I already attached my demo ldisc to a
/dev/ttymxc7 via the ldattach command in userspace. This looks fine so far.
Here my first Questions:
Is there a way to permanent attach the ldisc to an serial interface in the
Kernel?
I have a reset GPIO to reset the stm32 controller. I would like to toggle this
GPIO on opening the device. But the open() method in the ldisc driver seems
the wrong place to do this. But in which open() should I do this? the
underlying serial imx.c driver do not have any open() and I'am using this
driver also for other serial lines?
useful links to the ldisc topic:
https://www.kernel.org/doc/Documentation/serial/tty.txt
http://www.embeddedlinux.org.cn/essentiallinuxdevicedrivers/
Best Regards,
Oliver
next reply other threads:[~2018-03-23 8:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 8:18 Oliver Graute [this message]
2018-03-26 21:20 ` Writing a Line discpline driver to talk to a stm32 controller Stefan Wahren
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=20180323081814.GA12062@graute-opti \
--to=oliver.graute@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.