Writing a Line discpline driver to talk to a stm32 controller

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

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux