Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932805AbcK2Ryc convert rfc822-to-8bit (ORCPT ); Tue, 29 Nov 2016 12:54:32 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:51198 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932234AbcK2Ry1 (ORCPT ); Tue, 29 Nov 2016 12:54:27 -0500 From: Vivien Didelot To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Andrew Lunn Cc: Rob Herring , Frank Rowand , Andreas =?utf-8?Q?F=C3=A4rber?= , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michal Hrusecki , Tomas Hlavacek , "Bed\?\?icha Ko\?\?atu" , Florian Fainelli , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support In-Reply-To: <2c59cc79-b6dc-9920-1725-a7785ff3b6bf@kleine-koenig.org> 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> <20161128131735.GA4379@lunn.ch> <2c59cc79-b6dc-9920-1725-a7785ff3b6bf@kleine-koenig.org> Date: Tue, 29 Nov 2016 12:54:24 -0500 Message-ID: <87oa0yb29b.fsf@ketchup.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 35 Hi, Uwe Kleine-König writes: > Also it seems wrong to write "marvell,mv88e6085" (only) if I know the > hardware is really a "marvell,mv88e6176". I agree. It might be complex for a user to dig into the driver in order to figure out how the switch ID is read and which compatible to choose. I've sent a patch to change this https://lkml.org/lkml/2016/6/8/1198 but Andrew had a stronger opinion on compatible strings, which makes sense. >> 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. > > If you write > > compatible = "marvell,mv88e6176", "marvell,mv88e6085"; > > you can still enumerate in the same way as before. So we don't break the existing DTS files, I like this. The driver already prints info about the detected switch. Instead of failing at probe, which seems against the notion of compatible and breaks the existing behavior, it could report the eventual mismatch? We have examples for both usage, still I don't know what the best practices are. My _preference_ would go with enumerating them all. Thanks, Vivien