From patchwork Thu Dec 6 08:45:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo Serra X-Patchwork-Id: 1844091 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 408E33FC71 for ; Thu, 6 Dec 2012 08:45:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754795Ab2LFIpc (ORCPT ); Thu, 6 Dec 2012 03:45:32 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:42224 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754752Ab2LFIpc (ORCPT ); Thu, 6 Dec 2012 03:45:32 -0500 Received: by mail-we0-f174.google.com with SMTP id x10so2423256wey.19 for ; Thu, 06 Dec 2012 00:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Znl7SdaWFyueHvdfZprBs038PYdWe0kIUchp9LfXC9A=; b=weM5YqMvIOB4s8OpPH9XmEU0SmkCmQZf59rdXLNzXJzRAtKpufKa2uFksffqeLjYQE GLRaShDUCIN2uvCOANpI6JVL/vD+CQCXr0jqq3s2Tf4NVBhn99HrbcRA+lUN31Bgp5Nz p9mG9ENFFfdWZnIQOGV/OH6MFlDv0W8pLv0+qxG9XIZHi5BIsYKC8tfeBVtnTKAg7zhB Fx7ctwrM+4MlE1ohVY//XHz2Pldz/QgPG+MosyXTGv31DZuarwyQvGIcFPRMKFzH0mk/ kV+ZP5RNGQGJRCxmUMv6wMvVKHU8d48lXqtHKCWIzRwSh2h+kuPhwetUaBgaaBTs8ujW xeUw== Received: by 10.180.75.135 with SMTP id c7mr7653678wiw.10.1354783530498; Thu, 06 Dec 2012 00:45:30 -0800 (PST) Received: from localhost.localdomain (43.Red-2-139-180.staticIP.rima-tde.net. [2.139.180.43]) by mx.google.com with ESMTPS id g2sm10022170wiy.0.2012.12.06.00.45.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 00:45:29 -0800 (PST) From: Enric Balletbo i Serra To: Alan Cox , Greg Kroah-Hartman , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org Cc: Enric Balletbo i Serra Subject: [PATCH] serial: omap: add the functionality of a 9-bit UART with userspaces CMSPAR Date: Thu, 6 Dec 2012 09:45:04 +0100 Message-Id: <1354783504-7826-1-git-send-email-eballetbo@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Enric Balletbo i Serra Some systems require the additional communication functionality of a 9-bit UART. For that we could use the "stick" (mark/space) parity bit supported on omap serial device. When is set, if PARODD is set the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. Signed-off-by: Enric Balletbo i Serra --- drivers/tty/serial/omap-serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 6d3d26a..197fb71 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -756,6 +756,8 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, cval |= UART_LCR_PARITY; if (!(termios->c_cflag & PARODD)) cval |= UART_LCR_EPAR; + if (termios->c_cflag & CMSPAR) + cval |= UART_LCR_SPAR; /* * Ask the core to calculate the divisor for us.