mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Peter Hung <hpeter@gmail.com>
Cc: johan@kernel.org, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	tom_tsai@fintek.com.tw, peter_hong@fintek.com.tw,
	Peter Hung <hpeter+linux_kernel@gmail.com>
Subject: Re: [PATCH v2 3/4] usb: serial: implement function for F81232
Date: Wed, 21 Jan 2015 14:41:36 +0000	[thread overview]
Message-ID: <20150121144136.31f328cf@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1421836214-25582-1-git-send-email-hpeter+linux_kernel@gmail.com>


> +	if (cflag & PARENB) {
> +		if (cflag & PARODD)
> +			new_lcr |= UART_LCR_PARITY; /* odd */
> +		else
> +			new_lcr |= SERIAL_EVEN_PARITY; /* even */
> +	}

If you don't support mark/space also clear CMSPAR in the passed termios

> -	if (old_termios)
> -		tty_termios_copy_hw(&tty->termios, old_termios);

Also when you set the baud rate compute the resulting actual baud rate
you generated and set it with

	/* Don't rewrite B0 */
	if (tty_termios_baud_rate(termios))
		tty_termios_encode_baud_rate(termios, baud, baud);

so that the application gets told the baud rate it actually got if it
isn't close to the one they requested.

Alan

  reply	other threads:[~2015-01-21 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 10:30 Peter Hung
2015-01-21 14:41 ` One Thousand Gnomes [this message]
2015-01-22  3:38   ` Peter Hung

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=20150121144136.31f328cf@lxorguk.ukuu.org.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpeter+linux_kernel@gmail.com \
    --cc=hpeter@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter_hong@fintek.com.tw \
    --cc=tom_tsai@fintek.com.tw \
    /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

all inboxes | Powered by JetHome®