From: Anatolij Gustschin <agust@denx.de>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-serial@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] tty: serial: mpc5xxx: add support for mark/space parity
Date: Wed, 29 Aug 2012 23:56:53 +0200 [thread overview]
Message-ID: <20120829235653.7b96baf6@wker> (raw)
In-Reply-To: <1346076194-1830-1-git-send-email-w.sang@pengutronix.de>
Hi Wolfram,
On Mon, 27 Aug 2012 16:03:14 +0200
Wolfram Sang <w.sang@pengutronix.de> wrote:
> Tested on a custom MPC5200B-board using some fancy industrial protocol.
> Verified that MPC512x has identical bits, so should work there as well.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Greg KH <gregkh@linuxfoundation.org>
> ---
> drivers/tty/serial/mpc52xx_uart.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Looks good, so
Acked-by: Anatolij Gustschin <agust@denx.de>
> diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
> index bedac0d..f19d04e 100644
> --- a/drivers/tty/serial/mpc52xx_uart.c
> +++ b/drivers/tty/serial/mpc52xx_uart.c
> @@ -775,11 +775,15 @@ mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
> }
>
> if (new->c_cflag & PARENB) {
> + if (new->c_cflag & CMSPAR)
> + mr1 |= MPC52xx_PSC_MODE_PARFORCE;
> +
> + /* With CMSPAR, PARODD also means high parity (same as termios) */
> mr1 |= (new->c_cflag & PARODD) ?
> MPC52xx_PSC_MODE_PARODD : MPC52xx_PSC_MODE_PAREVEN;
> - } else
> + } else {
> mr1 |= MPC52xx_PSC_MODE_PARNONE;
> -
> + }
>
> mr2 = 0;
>
prev parent reply other threads:[~2012-08-29 21:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 14:03 [PATCH] tty: serial: mpc5xxx: add support for mark/space parity Wolfram Sang
2012-08-29 21:56 ` Anatolij Gustschin [this message]
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=20120829235653.7b96baf6@wker \
--to=agust@denx.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=w.sang@pengutronix.de \
/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