From: Andrew Lunn Subject: Re: [PATCH net-next] microchipT1phy: Add driver for Microchip LAN87XX T1 PHYs Date: Thu, 26 Apr 2018 14:27:43 +0200 Message-ID: <20180426122743.GB13467@lunn.ch> References: <20180425184944.24939-1-Nisar.Sayed@microchip.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: f.fainelli@gmail.com, davem@davemloft.net, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org To: Nisar.Sayed@microchip.com Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:41563 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754723AbeDZM1r (ORCPT ); Thu, 26 Apr 2018 08:27:47 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: > Fine, will change the filename. > The reason for moving to separate file is that we have a series of > T1 standard PHYs, which support cable diagnostics, signal quality > indicator(SQI) and sleep and wakeup (TC10) support etc. we planned > to keep all T1 standard PHYs separate to support additional features > supported by these PHYs. Is there anything shared with the other microchip PHYs? If there is potential for code sharing, you should do it. > > > + */ > > > +#ifndef _MICROCHIPT1PHY_H_ > > > +#define _MICROCHIPT1PHY_H_ > > > + > > > +/* Interrupt Source Register */ > > > +#define LAN87XX_INTERRUPT_SOURCE (0x18) > > > + > > > +/* Interrupt Mask Register */ > > > +#define LAN87XX_INTERRUPT_MASK (0x19) > > > +#define LAN87XX_MASK_LINK_UP (0x0004) > > > +#define LAN87XX_MASK_LINK_DOWN (0x0002) > > > > What's the point of that header file if all definitions are consumed by the > > same driver? > > > > We have planned a series of patches where we planned to use this further. Are you adding multiple files which share the header? If not, just add the defines to the C code. Andrew