From patchwork Sat Sep 27 13:36:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: j.uzycki@elproma.com.pl X-Patchwork-Id: 4989891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 125759F32B for ; Sat, 27 Sep 2014 13:38:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 465182022A for ; Sat, 27 Sep 2014 13:38:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8111C20225 for ; Sat, 27 Sep 2014 13:38:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXs8x-0005jx-Hu; Sat, 27 Sep 2014 13:34:35 +0000 Received: from v032797.home.net.pl ([89.161.177.31]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXs8t-0005hW-UN for linux-arm-kernel@lists.infradead.org; Sat, 27 Sep 2014 13:34:33 +0000 Received: from ip-78-133-172-40.ibd.gtsenergis.pl [78.133.172.40] (HELO ip165.elproma.lan) by elproma.home.pl [89.161.177.31] with SMTP (IdeaSmtpServer v0.80) id bab6753a4b8f381f; Sat, 27 Sep 2014 15:34:07 +0200 From: Janusz Uzycki To: Greg Kroah-Hartman , Sergei Shtylyov Subject: [PATCH] serial: mxs-auart: enable PPS support Date: Sat, 27 Sep 2014 15:36:38 +0200 Message-Id: <1411824998-24050-1-git-send-email-j.uzycki@elproma.com.pl> X-Mailer: git-send-email 1.7.11.3 In-Reply-To: <5426B1F0.9050006@cogentembedded.com> References: <5426B1F0.9050006@cogentembedded.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140927_063432_164154_48081A58 X-CRM114-Status: UNSURE ( 8.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: devicetree@vger.kernel.org, Russell King - ARM Linux , Richard Genoud , Fabio Estevam , Janusz Uzycki , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enables PPS support in mxs-auart serial driver to make PPS API working. Signed-off-by: Janusz Uzycki --- drivers/tty/serial/mxs-auart.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 4c238bf..fc262ba 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -782,6 +782,16 @@ 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; + } +} + static irqreturn_t mxs_auart_irq_handle(int irq, void *context) { u32 istat; @@ -949,6 +959,7 @@ static struct uart_ops mxs_auart_ops = { .startup = mxs_auart_startup, .shutdown = mxs_auart_shutdown, .set_termios = mxs_auart_settermios, + .set_ldisc = mxs_auart_set_ldisc, .type = mxs_auart_type, .release_port = mxs_auart_release_port, .request_port = mxs_auart_request_port,