Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965630AbbLPK1l (ORCPT ); Wed, 16 Dec 2015 05:27:41 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:58338 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754733AbbLPK1h (ORCPT ); Wed, 16 Dec 2015 05:27:37 -0500 From: Arnd Bergmann To: Sergei Ianovich Cc: linux-kernel@vger.kernel.org, Alan Cox , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Jiri Slaby , Heikki Krogerus , Andy Shevchenko , Scott Wood , Masahiro Yamada , Sebastian Andrzej Siewior , Paul Burton , Joachim Eastwood , Mans Rullgard , Paul Gortmaker , Peter Hurley , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:SERIAL DRIVERS" Subject: Re: [PATCH v5] serial: support for 16550A serial ports on LP-8x4x Date: Wed, 16 Dec 2015 11:26:38 +0100 Message-ID: <3230140.YE724HtqOd@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1450253097.21989.78.camel@gmail.com> References: <1397668667-27328-1-git-send-email-ynvich@gmail.com> <1970812.j9fZPC5F1b@wuerfel> <1450253097.21989.78.camel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:pILZxBsaq1t1TACxEbllRBcRv16ySR6f+jdDyMsbehOCNahNhJC Ifjrs9FKHnCh63Nwt1GMoyobezWOrks77ZKDWs7HhB25q8mTe1g19gbFPTRIuigUV91AsG8 7kHce13GjOfb3hPCidivcNdGBRfI13J0eLU3TLcJfCOV68hK0wpsBZHuE3MkE5Bev3DGWFB L+93WgQvdkLTTyFBbT0DA== X-UI-Out-Filterresults: notjunk:1;V01:K0:2V1Ram92ZGQ=:nwYiyzGdXO6DdU+Cndr0a+ 7YYXwskjaTem1T4FtNwpwh7BJ0y0eIohjjJkpJBONzhSMJOsksCj1arxjcq/p0Ce3RwUd999R ID0fRWv/nsaGj/EcVGS2nVbyZoUVV8JJqNvy1m9CtDo9aWBL5U4QKQO9kkuUhYO6FDd+o8d3Z eN3X2GTgHY8cIXVP0sh0BBHVK+51NulalnQgPf6sBcK/n5mSVpSqXP8KtI2joVAdmN7IGy9GV k7uzXGgJzIJ2pR28Q6+KjjtcMSxWlw+/1RagabBFcYPZ2SDH2FDp/oKPKCKMUn5px09B/J4DP vXwMTPds3iF63waKn6pzMSY6gsZDkGqMwmv0EcMtDS4LMJz+wb4z92LRbxJ/HvqoKjMvWzbjb 7fFjUB0iYnfXUt6wcjZvlaG7ANnIYC6P7kUQESExBAKpIXjx9p+VaC3+60pRHx6ZMRzzRFM1x 0gd/U/9f/lu/4u+OLisY3rh78Cs+It0rperBBNdrpFK9g6nqLL+X5Uv4g343PVv7QqBuoivlF 9obhIAtnxMaBR+c87H5L3vlE6coEhcRgrOeVOYpg2bujEG1MTEVpRBQymsap4Hs9muIVe3kaF gI9iXTax9F/vvcLR+QH6ryhcYETQ7EKMlv2Usgrh2Mav//gWq+QXQnG5DqA+yy2/cKU+BvJXm IiO/V40cK5FJUaQ/KrEsyO2P8KOAJdH6jojoAaT058qNGWvBIdppjhWC0Sb5Ii3r0RVGN211K DBaZpDL38v75zEGs Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2702 Lines: 66 On Wednesday 16 December 2015 11:04:57 Sergei Ianovich wrote: > On Tue, 2015-12-15 at 22:51 +0100, Arnd Bergmann wrote: > > On Wednesday 16 December 2015 00:04:45 Sergei Ianovich wrote: > > > index 0000000..5f9a4c1 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/serial/lp8x4x-serial.txt > > > @@ -0,0 +1,35 @@ > > > +UART ports on ICP DAS LP-8x4x > > > + > > > +ICP DAS LP-8x4x contains three additional serial ports interfaced > > > via > > > +Analog Devices ADM213EA chips in addition to 3 serial ports on PXA > > > CPU. > > > + > > > +Required properties: > > > +- compatible : should be "icpdas,uart-lp8x4x" > > > > Compatible strings should not include a 'x' wildcard like this, better > > use > > the specific chip name. > > > > Also, it sounds like you named them after the board vendor, which > > sounds > > wrong as the vendor part of the compatible string should be the > > whoever > > made that part (analog?) > > The chips themselves are standard, they would work with 8250_core if > properly connected. However, they are not connected normally. Al least > some of their config pins are wired to a different address region. So > the driver is board-specific. Ok, I see. > 'x' wildcards in the name of the board seem important. There are devices > made by the same vendor without 8 or 4 in their name. Those devices > either are not shipped with linux or are base on a x86 platform. > > Does this justify the choice of the compatible string? What I meant was that you should use the specific numbers of one machine, precisely for the reason you list above. If there is e.g. a LP-8040 and a LP-8141 today, and you use lp8x4x in the compatible string to cover both, this will no longer work when the vendor comes out with a LP8047 that is completely different. Instead, what you should do is to use the compatible string to identify one particular board (e.g. the first one that used this setup), and then list the other ones as compatible with this. You can also add the other board names in addition, e.g. compatible = "icpdas,uart-lp8041", "icpdas,uart-lp8040"; for a lp8041 that is compatible with the lp8040. If it turns out later that they are not entirely compatible, we can work around this in the driver by checking for the lp8041 string that will be matched first, while the lp8040 can be used by the driver to match the entire family of compatible machines (no need to list every one in the driver). Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/