From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Ianovich Subject: Re: [PATCH v7] serial: support for 16550A serial ports on LP-8x4x Date: Tue, 01 Mar 2016 22:28:13 +0300 Message-ID: <1456860493.23036.133.camel@gmail.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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1456854532.13244.215.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Shevchenko , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Alan Cox , 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" List-Id: devicetree@vger.kernel.org On Tue, 2016-03-01 at 19:48 +0200, Andy Shevchenko wrote: > On Tue, 2016-03-01 at 20:14 +0300, Sergei Ianovich wrote: > > On Tue, 2016-03-01 at 18:46 +0200, Andy Shevchenko wrote: > > > On Tue, 2016-03-01 at 19:25 +0300, Sergei Ianovich wrote: > > > > On Tue, 2016-03-01 at 13:06 +0200, Andy Shevchenko wrote: > > > > > On Tue, 2016-03-01 at 00:26 +0300, Sergei Ianovich wrote: >=20 > > > So, but if you support only fixed rates, why do you care about > > > BOTHER > > > at all? > >=20 > > If BOTHER is defined,=C2=A0tty_termios_baud_rate() > > and=C2=A0tty_termios_encode_baud_rate() allow non-standard baud rat= es. I > > should clear it from=C2=A0c_cflag to indicate I don't support it. > >=20 > > > > > > =C2=A0 > > > > > I think you can call this unconditionally together with case > > > > > > > > > > > 115200. > > > >=20 > > > > The calls are orthogonal. This one deals with the case when > > > > BOTHER > > > > is > > > > defined and set, and we have non-zero rate with BOTHER, but we > > > > have > > > > zero rate after BOTHER is cleared. So we set 9600 as a sane > > > > default > > > > speed. >=20 > Maybe you just set a baud rate nearest to the one from the table in > case of BOTHER? >=20 > In that case perhaps you have to supply +-1 to the range. That's why > I > asked about=C2=A0uart_get_baud_rate().=C2=A0 >=20 > Maybe this flow will work for you >=20 > if (BOTHER) > =C2=A0clear BOTHER > =C2=A0call=C2=A0uart_get_baud_rate() >=20 > ? It works well for standard rates, let it be so. If there ever is a problem, we can fix it. -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html