From patchwork Tue Aug 19 12:14:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frans Klaver X-Patchwork-Id: 4742351 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DF976C033A for ; Tue, 19 Aug 2014 12:17:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B776B20172 for ; Tue, 19 Aug 2014 12:17:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 921A32016C for ; Tue, 19 Aug 2014 12:17:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbaHSMPp (ORCPT ); Tue, 19 Aug 2014 08:15:45 -0400 Received: from filter1.ibarracuda.nl ([83.247.7.10]:51217 "EHLO filter1.ibarracuda.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752687AbaHSMPC (ORCPT ); Tue, 19 Aug 2014 08:15:02 -0400 X-ASG-Debug-ID: 1408450499-0759e7416b4764220002-g9IbbW Received: from XSMCASSVR01.xsens-tech.local (rev-215.116.249.87.virtu.nl [87.249.116.215]) by filter1.ibarracuda.nl with ESMTP id EUbtDq35eQA34MBw (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Tue, 19 Aug 2014 14:14:59 +0200 (CEST) X-Barracuda-Envelope-From: Frans.Klaver@xsens.com X-Barracuda-AUTH-User: xsenscom X-Barracuda-Apparent-Source-IP: 87.249.116.215 Received: from ci00147.xsens-tech.local (172.16.11.49) by XSMCASSVR01.xsens-tech.local (192.168.0.248) with Microsoft SMTP Server id 14.3.195.1; Tue, 19 Aug 2014 14:14:58 +0200 From: Frans Klaver To: Felipe Balbi CC: Frans Klaver , Tony Lindgren , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Alexey Pelykh , Jiri Slaby , Frans Klaver , , , , , Subject: [PATCH 4/4] tty: omap-serial: support setting of hardware flow control in dts Date: Tue, 19 Aug 2014 14:14:48 +0200 X-ASG-Orig-Subj: [PATCH 4/4] tty: omap-serial: support setting of hardware flow control in dts Message-ID: <1408450488-4083-5-git-send-email-frans.klaver@xsens.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1408450488-4083-1-git-send-email-frans.klaver@xsens.com> References: <1406645577-18620-1-git-send-email-frans.klaver@xsens.com> <1408450488-4083-1-git-send-email-frans.klaver@xsens.com> MIME-Version: 1.0 X-Originating-IP: [172.16.11.49] X-Barracuda-Connect: rev-215.116.249.87.virtu.nl[87.249.116.215] X-Barracuda-Start-Time: 1408450499 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://filter1.ibarracuda.nl:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ibarracuda.nl X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.8612 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 This makes hardware flow control availability configurable from the device tree. Signed-off-by: Frans Klaver --- Documentation/devicetree/bindings/serial/omap_serial.txt | 1 + drivers/tty/serial/omap-serial.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/omap_serial.txt b/Documentation/devicetree/bindings/serial/omap_serial.txt index 342eedd..1b629e9 100644 --- a/Documentation/devicetree/bindings/serial/omap_serial.txt +++ b/Documentation/devicetree/bindings/serial/omap_serial.txt @@ -8,3 +8,4 @@ Required properties: Optional properties: - clock-frequency : frequency of the clock input to the UART +- has-hw-flow-control : the hardware has flow control capability diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 57664b9..7d3b3d2 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1598,6 +1598,10 @@ static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) of_property_read_u32(dev->of_node, "clock-frequency", &omap_up_info->uartclk); + + if (of_property_read_bool(dev->of_node, "has-hw-flow-control")) + omap_up_info->flags |= UPF_HARD_FLOW; + return omap_up_info; }