From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89D43C433F5 for ; Fri, 15 Apr 2022 14:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350924AbiDOOiB (ORCPT ); Fri, 15 Apr 2022 10:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231266AbiDOOiA (ORCPT ); Fri, 15 Apr 2022 10:38:00 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EEE41619; Fri, 15 Apr 2022 07:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=5RyQgEC1HEfGTnmZF0JawQFMsn2Sbm5XUHT2q7t6y2U=; b=xTmF59vKdWU3OVIrzTm3k8yuGP TajKjIfn1rfAGjih4X2g8hsbNj1EP0kL6YDqnkF/sI2KY6UCw6GIV84WH1EInuNaZvdTyLcuh6lF5 OairZIFgSrpSdZ/nfqOCPoH3qax3SJrGhP77EXQCoxsuOWzyzskEZhv7M3HAHetDRseU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nfN2m-00Fyrn-5W; Fri, 15 Apr 2022 16:35:28 +0200 Date: Fri, 15 Apr 2022 16:35:28 +0200 From: Andrew Lunn To: Luiz Angelo Daros de Luca Cc: Alvin =?utf-8?Q?=C5=A0ipraga?= , "netdev@vger.kernel.org" , "linux-doc@vger.kernel.org" , "tobias@waldekranz.com" , "f.fainelli@gmail.com" , "vladimir.oltean@nxp.com" , "corbet@lwn.net" , "kuba@kernel.org" , "davem@davemloft.net" , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Subject: Re: [PATCH net-next] net: dsa: realtek: add compatible strings for RTL8367RB-VB Message-ID: References: <20220411210406.21404-1-luizluca@gmail.com> <20220412105018.gjrswtwrgjyndev4@bang-olufsen.dk> <20220414014527.gex5tlufyj4hm5di@bang-olufsen.dk> <20220414113718.ofhgzhsmvyuxd2l2@bang-olufsen.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > Now, about dt-bindings, I don't know what is the best approach. As > device-tree should not focus on Linux, it is strange to use a > compatible "rtl8365mb" just because it is the Linux subdriver name and > that name was just because it was the first device supported. What you are trying to express is, how do you access the ID register. There is no obvious One True Compatible string for that. So just picking one switch name for that is O.K. There is nothing Linux specific in that, FreeBSD or whatever can use the label as a clue where to find the ID register. > + realtek,rtl8365mb: > + Use with models RTL8363NB, RTL8363NB-VB, RTL8363SC, RTL8363SC-VB, > + RTL8364NB, RTL8364NB-VB, RTL8365MB, RTL8366SC, RTL8367RB-VB, RTL8367S, > + RTL8367SB, RTL8370MB, RTL8310SR > + realtek,rtl8367rb: > + Use with models RTL8366RB, RTL8366S So to me, this is fine. But i might add a bit more detail, that the compatible is used by the driver to find the ID register, and the driver then uses to ID register to decide how to drive the switch. The problem i had with the mv88e6xxx binding was until i spelt this out in the binding, people kept submitting patches adding new compatible strings, rather than extend the documented list of switches supported by a compatible. Andrew