Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1936061imm; Wed, 16 May 2018 05:29:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPrMtGTJozZewZayf8Kt2IJQo7B4CtG7c4UEpDK+8y65l3U5+ZUDwjyhwOhwe+vkJ7zIIc X-Received: by 2002:a63:741d:: with SMTP id p29-v6mr570528pgc.451.1526473753955; Wed, 16 May 2018 05:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526473753; cv=none; d=google.com; s=arc-20160816; b=O9Ex6a26cykuaHh6WlL9cstPVtRbEyfdqS5LtIsOzOc5CMr15W3ZxWYyO/8CL9kxkc rMz7Q9+GBEqOWZWnXHuobEzXYrQ83Wtn9OqUnmB+lsiFprWSRe+sHPb99RydOUQJK2Mc zyWket1n2fv2b8vSBC/gxBFEB055pQ8g+Eg7qLZxfcoMDvvGc9MhoRCjZyk8ha4eG74g +DUAnEpxE8EkpRfuzoP52hLcTQZa+69uI08MaECjq4Bp0/cm/w9FNAQnn+1vQsc34U9M TgEGzU2QNPwGFTj50/de2cxM5zRoiTTwMPG34ZNFk7T6CkxmH3kckYVQ+7MRKjEDFGBD sBGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0EkWN/af4Pfp46Bwpo3UIZQ2ekRoC+5sbbm2Qm2ghsw=; b=fmFH7t8IA8YTuGV/1RlCHKu7fJEE3bSkQgjyDutv/qwBilZijAMzdJf7cMs9KnAhcU 10YWdNS9Nuo2Ml5FbdpW3soSL7cjGKEsMtoNlxPc/FR88Awk0d5Y0E5jj5BLKyF2RIQq ob3pyVIGKuhLAuR3Dkoe/UGkqgZxEOKspoOBccn1wFXhjVE7uQk5uVqAU8U13KvhPHl7 vykwVpzaiCcrK3lBHUZeK4Eo3TCHwMTLfGocZPFIWS7yvbRLvuq8AfK+B24RkePfhXTx hu+cnCPExMSle//D8YtlsPt/htfZ7MGn/VwYzauAO1l7eooRGtX70ntwRzTD+KnFlk35 MVrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=57C+Ui6H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si2374647pls.422.2018.05.16.05.28.59; Wed, 16 May 2018 05:29:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=57C+Ui6H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbeEPM2m (ORCPT + 99 others); Wed, 16 May 2018 08:28:42 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:32967 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbeEPM2j (ORCPT ); Wed, 16 May 2018 08:28:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=0EkWN/af4Pfp46Bwpo3UIZQ2ekRoC+5sbbm2Qm2ghsw=; b=57C+Ui6HTqYaCyZkBREcyAOAF/9Y2g7zKZggEhr+vvmLNsKSQGn7POUJ+XVFe5bmr9xX0Jx7hHaZJur7uNNkny2P4l1qE2y6GLGpfKrSjpV7xZDBATyb7d0E4BxlqxM0w28xTK1cn7xzdbC+V/Mtr3lZ3m6CUQhvIdcQWCScSlQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1fIvX6-0005up-IP; Wed, 16 May 2018 14:27:52 +0200 Date: Wed, 16 May 2018 14:27:52 +0200 From: Andrew Lunn To: Geert Uytterhoeven Cc: Florian Fainelli , netdev , Vivien Didelot , "David S. Miller" , Nicolas Ferre , Fugang Duan , Sergei Shtylyov , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Grygorii Strashko , Woojung Huh , Microchip Linux Driver Support , Rob Herring , Frank Rowand , Antoine Tenart , Tobias Jordan , Russell King , Geert Uytterhoeven , Thomas Petazzoni , Niklas =?iso-8859-1?Q?S=F6derlund?= , Simon Horman , Maxim Uvarov , Sekhar Nori , open list , "open list:RENESAS ETHERNET DRIVERS" , "open list:TI ETHERNET SWITCH DRIVER (CPSW)" , "open list:USB NETWORKING DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" Subject: Re: [PATCH net-next v2 0/2] of: mdio: Fall back to mdiobus_register() with NULL device_node Message-ID: <20180516122752.GC22000@lunn.ch> References: <20180515235619.27773-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 16, 2018 at 10:54:12AM +0200, Geert Uytterhoeven wrote: > Hi Florian, > > Thanks for your series! > I like the effect on simplifying drivers. > > On Wed, May 16, 2018 at 1:56 AM, Florian Fainelli wrote: > > This patch series updates of_mdiobus_register() such that when the device_node > > argument is NULL, it calls mdiobus_register() directly. This is consistent with > > the behavior of of_mdiobus_register() when CONFIG_OF=n. > > IMHO the CONFIG_OF=n behavior of of_mdiobus_register() (which I wasn't > aware of) is inconsistent with the behavior of other of_*() functions, > which are just empty stubs. > > So I'm wondering if you should do it the other way around, and let > mdiobus_register() call of_mdiobus_register() if dev->of_node exists? Hi Geert dev->of_node is often not the correct OF node. The mdio properties are often embedded inside a MAC driver, and use an 'mdio' container node. This container node is needed, not the device node. > I haven't looked at the ACPI handling, but perhaps this can be moved > inside mdiobus_register() as well? The ACPI binding for MDIO and PHYs has not been defined yet. Andrew