Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754753AbcK1NSG (ORCPT ); Mon, 28 Nov 2016 08:18:06 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:59611 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754482AbcK1NR5 (ORCPT ); Mon, 28 Nov 2016 08:17:57 -0500 Date: Mon, 28 Nov 2016 14:17:35 +0100 From: Andrew Lunn To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Rob Herring , Frank Rowand , Andreas =?iso-8859-1?Q?F=E4rber?= , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michal Hrusecki , Tomas Hlavacek , Bed??icha Ko??atu , Vivien Didelot , Florian Fainelli , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support Message-ID: <20161128131735.GA4379@lunn.ch> References: <1480280279-9552-1-git-send-email-afaerber@suse.de> <1480280279-9552-2-git-send-email-afaerber@suse.de> <20161127212709.GD13318@lunn.ch> <9500470d-09c3-3ecb-994b-3d108bffc99e@suse.de> <20161127220846.GH13318@lunn.ch> <20161127231009.GA17704@lunn.ch> <20161128080939.ippqlytvojitefkp@perseus.defre.kleine-koenig.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128080939.ippqlytvojitefkp@perseus.defre.kleine-koenig.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1651 Lines: 35 > I still wonder (and didn't get an answer back when I asked about this) > why a comment is preferred here. For other devices I know it's usual and > requested by the maintainers to use: > > compatible = "exact name", "earlyer device to match driver"; > > . This is more robust, documents the situation more formally and makes > it better greppable. The price to pay is only a few bytes in the dtb > which IMO is ok. We did discuss this a while back. The information is useless and should to be ignored if present. The switch has a register which contains its model and revision. Each port has a set of registers, and register 3 contains the model/version. For all devices compatible with the 6085, the port registers start at address 0x10. For the 6190, the port registers start at 0x0. So given one of these two compatible strings, we can find the model of the device, from something which is burned into the silicon. Now, say we did add per device compatible strings. We look up the model burned into the silicon, find it is different to what the device tree is and do what? Fail the probe? Or just keep going using the value in the silicon? It seems silly to fail the probe if the driver does support the model, but that means the device tree is never verified and hence probably wrong. Why have wrong information in the device tree, especially wrong information which we never use. It is better to not have that information in the device tree. Linus has said he does not like ARM devices because of all the busses which are not enumerable. Here we have a device which with a little bit of help we can enumerate. So we should. Andrew