Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752225AbcCASoS (ORCPT ); Tue, 1 Mar 2016 13:44:18 -0500 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:57786 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbcCASoR (ORCPT ); Tue, 1 Mar 2016 13:44:17 -0500 Date: Tue, 1 Mar 2016 18:43:27 +0000 From: One Thousand Gnomes To: Andy Shevchenko Cc: Sergei Ianovich , linux-kernel@vger.kernel.org, Arnd Bergmann , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Jiri Slaby , Heikki Krogerus , Peter Hurley , Masahiro Yamada , Paul Burton , Mans Rullgard , Joachim Eastwood , Scott Wood , Paul Gortmaker , Peter Ujfalusi , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:SERIAL DRIVERS" Subject: Re: [PATCH v7] serial: support for 16550A serial ports on LP-8x4x Message-ID: <20160301184327.148b3ad4@lxorguk.ukuu.org.uk> In-Reply-To: <1456854532.13244.215.camel@linux.intel.com> References: <1456589675-25377-1-git-send-email-ynvich@gmail.com> <1456781209-11390-1-git-send-email-ynvich@gmail.com> <1456830401.13244.189.camel@linux.intel.com> <1456849504.23036.108.camel@gmail.com> <1456850782.13244.208.camel@linux.intel.com> <1456852472.23036.124.camel@gmail.com> <1456854532.13244.215.camel@linux.intel.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 574 Lines: 22 > Maybe you just set a baud rate nearest to the one from the table in > case of BOTHER? This is broken. BOTHER can be set with a perfectly valid baud rate that could equally be represented by B9600 say. If you are stuck with limited ranges then switch(baud) { case 9600: case 4800: etc and don't worry about BOTHER, it's entirely transparent to you. The core kernel code will provide you with a baud rate number, the re-encoder will always do the right thing. A driver should never care about BOTHER or any of the baud bits in the termios structure directly. Alan