From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f67.google.com ([209.85.160.67]:33209 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754070AbeCUWrF (ORCPT ); Wed, 21 Mar 2018 18:47:05 -0400 Date: Wed, 21 Mar 2018 15:47:02 -0700 From: Richard Cochran To: Andrew Lunn Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, David Miller , Florian Fainelli , Mark Rutland , Miroslav Lichvar , Rob Herring , Willem de Bruijn Subject: Re: [PATCH net-next RFC V1 5/5] net: mdio: Add a driver for InES time stamping IP core. Message-ID: <20180321224702.cbcq3wckmojsrgjf@localhost> References: <20180321193315.GR24516@lunn.ch> <20180321213636.2mmfveu2vg5qbwpp@localhost> <20180321214436.GX24516@lunn.ch> <20180321215729.engnoxpaympvvdc5@localhost> <20180321221652.GZ24516@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180321221652.GZ24516@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Mar 21, 2018 at 11:16:52PM +0100, Andrew Lunn wrote: > The MAC drivers are clients of this device. They then use a phandle > and specifier: > > eth0: ethernet-controller@72000 { > compatible = "marvell,kirkwood-eth"; > #address-cells = <1>; > #size-cells = <0>; > reg = <0x72000 0x4000>; > > timerstamper = <×tamper 2> > } > > The 2 indicates this MAC is using port 2. > > The MAC driver can then do the standard device tree things to follow > the phandle to get access to the device and use the API it exports. But that would require hacking every last MAC driver. I happy to improve the modeling, but the solution should be generic and work for every MAC driver. Thanks, Richard