Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753539AbcDZTZl (ORCPT ); Tue, 26 Apr 2016 15:25:41 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:51700 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752471AbcDZTZi (ORCPT ); Tue, 26 Apr 2016 15:25:38 -0400 From: Arnd Bergmann To: Andrew Lunn Cc: Florian Fainelli , Pramod Kumar , Rob Herring , Catalin Marinas , Will Deacon , Masahiro Yamada , Chen-Yu Tsai , Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Suzuki K Poulose , netdev@vger.kernel.org, Punit Agrawal , linux-kernel@vger.kernel.org, BCM Kernel Feedback , linux-arm-kernel@lists.infradead.org, Anup Patel , Kishon Vijay Abraham I Subject: Re: [PATCH 1/6] bus: Add shared MDIO bus framework Date: Tue, 26 Apr 2016 21:24:34 +0200 Message-ID: <9424602.Vqb0FY56gH@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160426182335.GE30107@lunn.ch> References: <1461230323-27891-1-git-send-email-pramod.kumar@broadcom.com> <5167289.0a4LBoWhyX@wuerfel> <20160426182335.GE30107@lunn.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:YdVy/f3ukk6cCtduLKI2KCg2CmPZy0hIerTVdsZFwKOJcgtQWM7 GILoB4OcJwKBGFi8q0mKgc9inRnkS4YB5cL8CkJuocV5OCPiEGlM7FmTlRuxJr73cqort6A e0o+hp0LiTZEj+PelZfSnRe63yaPmXhbt+RL6nT0XMgsDH9ulzMkVXeer3O3tHujR5sHXfo QoJUpEQDoZ2TBxjaVkFtQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:yHCba61ZJWo=:/+UWISzI/0n0YtfN/B/NOr Ky7pLdF5kEiP5HH67NTdvdLd7jDcUw0DdmEi6Lq+xtiYfM9QP+rZaHRuiFm/GZSmMdbQQXTFZ OWT455i2qbPC/UC0VDS8/zKGa7nYaB+sQcyZZ0AwMNyHveg/f3GyPwDpBFP+tP4NR7SPE0Vly YsONz5Kc8+cnzqQKkfITGL9B+WOSWv1EMhHnDMCixOv7tqMElyKxKKKOAJ1TrDh1iX2BEqrX1 kY8qCcazudAutOt35+2kv97cf/XhaskZEy+6I8DnfqiR8ywjL4ZMhvIFvXamXO4rboICdscAh Gu6Q+gEOXsWNM05aOzvQMNmRLP0avQ/E3e1v6Bjh4wi+GQ47ygsRhIqljEjS6On6/XFgmpaVT JwKlxo61lOxZPLo++XG7z3tJAekdFiHzk6nHxSO7LDhfQkYfUNRncZVxWuQBxp871I1EdZ40j LQUH9j4Aqy1bWQYQOOoZaY7HEh5nEE//WLvY8ehs36eX/vX7Z6kNBxVTPmVwHnvGBdYpUa5BH JjVANWHE5R3G0amWpGrvmRZ6rQp8+SapWJ6WtiyUMruPyHaOJ8rsJRFE39FioKb7RKNnZ9ZLu myWUNn/hvt4YUqQht04gwnXbR4RSJb7kYVBUs3nqyeEWMqI0xBG5kCpI/nr238LugFWQr6W6X V0eudPm1vHnVbWjWzETm0NPeOCWZTCOLocLDFAGXnhyltnl2fcVTnrSavSVImmxXj6pD8QJcQ 8sKwYZlOYGhwHurg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 994 Lines: 21 On Tuesday 26 April 2016 20:23:35 Andrew Lunn wrote: > > A more complex problem would be having a PHY driver for a device > > that can be either an ethernet phy or some other phy. > > I doubt that ever happens. You can have up to 32 different devices on > an MDIO bus. Since an Ethernet PHY and a "some other sort of PHY" are > completely different things, why would a hardware engineer place them > on the same address? It is like saying your ATA controller and VGA > controller share the same slot on the PCI bus... To clarify: what I meant is a device that is designed as a PHY for similar hardware (e.g. SATA, USB3 and PCIe) and that has a common register set and a single driver, but that driver can operate in multiple modes. You typically have multiple instances of such hardware, with each instance linked to exactly one host device, but one driver for all of them. See Documentation/devicetree/bindings/phy/apm-xgene-phy.txt and drivers/phy/phy-xgene.c for one such example. Arnd