linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Westermann <mw@microdata-pos.de>
To: linux-serial@vger.kernel.org
Subject: change HW flow-control
Date: Thu, 6 May 2004 16:39:09 +0200	[thread overview]
Message-ID: <20040506163909.A21706@microdata-pos.de> (raw)

Hello,

I work on a change for the serial driver, 
first for a i386 kernel 2.4.xx. Many POS printers and devices 
from different vendors use DTR/DSR flow control, not RTS/CTS. 

I think it's a good idea to change the serial.c module for flexible
flow control. My idea is to add one or two additional variables 
for the hw flow control.

info->modem_flow 	/* Modem lines  */ 
info->status_flow 	/* Status lines */

example: setting for ctrscts in serial.c not complete.

@@ -1751,6 +1751,8 @@
 		info->IER |= UART_IER_MSI;
 	if (cflag & CRTSCTS) {
 		info->flags |= ASYNC_CTS_FLOW;
+		info->status_flow = UART_MSR_CTS;
+		info->modem_flow  = UART_MCR_RTS;
 		info->IER |= UART_IER_MSI;
 	} else
 		info->flags &= ~ASYNC_CTS_FLOW;


With this change can we use few different flow-controls e.g.
CTS/DTR, DTR/DSR RTS/DSR .. DTR/CD. 

I think is a good idea to integrate the new settings in the termios flags.

/* c_lflag bits */
#define CHWFLOW	001000000000 

and set the hw stop and start bits in the  c_cc array.
either in the VSTART and VSTOP field or in the free field index 17 and 18.    	

Alternatively the new HW flow lines could be set with a new ioctl.
 
What is the best way to set status_flow and modem_flow?  

Michael

                 reply	other threads:[~2004-05-06 14:39 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=20040506163909.A21706@microdata-pos.de \
    --to=mw@microdata-pos.de \
    --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).