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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F28F5C433E4 for ; Wed, 15 Jul 2020 13:00:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9A4C206D5 for ; Wed, 15 Jul 2020 13:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731264AbgGONA7 (ORCPT ); Wed, 15 Jul 2020 09:00:59 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:36738 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgGONA6 (ORCPT ); Wed, 15 Jul 2020 09:00:58 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jvh1i-005FBd-Jk; Wed, 15 Jul 2020 15:00:46 +0200 Date: Wed, 15 Jul 2020 15:00:46 +0200 From: Andrew Lunn To: Helmut Grohne Cc: Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Woojung Huh , Microchip Linux Driver Support , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Rob Herring , "devicetree@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH] net: dsa: microchip: look for phy-mode in port nodes Message-ID: <20200715130046.GB1211629@lunn.ch> References: <20200617082235.GA1523@laureti-dev> <20200714120827.GA7939@laureti-dev> <20200714222716.GP1078057@lunn.ch> <20200715073112.GA25047@laureti-dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200715073112.GA25047@laureti-dev> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jul 15, 2020 at 09:31:12AM +0200, Helmut Grohne wrote: > You seem to be in favour of more deeply encoding the "there can be only > one CPU port" assumption. Based on that assumption, the rest of what you > write makes very much sense to me. Is that the direction to go? >From what i understand, there is only one port which can do RGMII. It does not really matter if that is the CPU port, or a user port. Ideally, whatever port it is, should have the phy-mode property in its port node. How you store that information until you need it is up to the driver. But KISS is generally best, reuse what you have, unless there is a good reason to change it. If you see this code being reused when more than one port supports RGMII, then adding a per port members makes sense. But if that is unlikely, keep with the global. Andrew