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 01475C433E1 for ; Tue, 14 Jul 2020 22:27:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D56F52072D for ; Tue, 14 Jul 2020 22:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727971AbgGNW1a (ORCPT ); Tue, 14 Jul 2020 18:27:30 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:35682 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgGNW1a (ORCPT ); Tue, 14 Jul 2020 18:27:30 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jvTOO-0057wB-Jb; Wed, 15 Jul 2020 00:27:16 +0200 Date: Wed, 15 Jul 2020 00:27:16 +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: <20200714222716.GP1078057@lunn.ch> References: <20200617082235.GA1523@laureti-dev> <20200714120827.GA7939@laureti-dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714120827.GA7939@laureti-dev> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Jul 14, 2020 at 02:08:28PM +0200, Helmut Grohne wrote: > Documentation/devicetree/bindings/net/dsa/dsa.txt says that the phy-mode > property should be specified on port nodes. However, the microchip > drivers read it from the switch node. > > Let the driver use the per-port property and fall back to the old > location with a warning. > > Fix in-tree users. Hi Helmut I think this change is more complex than it needs to be. Only the CPU port supports different interface modes. So i don't see the need to handle both dev->interface and p->interface. Just first search ksz_switch_register() first look in the cpu port node, and if not found go back to the old location. The rest of the code can stay the same. Andrew