Subject: [PATCH 4/4] serial: mxs-auart: enable PPS support

From: [email-masked] (Sergei Shtylyov)
Date: Sat, 27 Sep 2014 16:47:44 +0400

Hello.

On 9/27/2014 1:46 PM, Janusz Uzycki wrote:

> Enables PPS support in mxs-auart serial driver to make PPS API working.

> Signed-off-by: Janusz Uzycki <[email-masked]>
> ---
>   drivers/tty/serial/mxs-auart.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)

> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
> index ab127a2..4f1ab98 100644
> --- a/drivers/tty/serial/mxs-auart.c
> +++ b/drivers/tty/serial/mxs-auart.c
> @@ -787,6 +787,15 @@ static void mxs_auart_settermios(struct uart_port *u,
>   		mxs_auart_disable_ms(u);
>   }
>
> +static void mxs_auart_set_ldisc(struct uart_port *port, int new)
> +{
> +	if (new == N_PPS) {
> +		port->flags |= UPF_HARDPPS_CD;
> +		mxs_auart_enable_ms(port);
> +	} else
> +		port->flags &= ~UPF_HARDPPS_CD;

    The kernel coding style dictates that {} should be in both arms of the 
*if* statement.

[...]

WBR, Sergei