From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755917AbdCXH4f (ORCPT ); Fri, 24 Mar 2017 03:56:35 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:59442 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbdCXHzd (ORCPT ); Fri, 24 Mar 2017 03:55:33 -0400 Date: Fri, 24 Mar 2017 08:53:00 +0100 From: Andrew Lunn To: Sean Wang Cc: f.fainelli@gmail.com, vivien.didelot@savoirfairelinux.com, matthias.bgg@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, davem@davemloft.net, Landen.Chao@mediatek.com, keyhaede@gmail.com, objelf@gmail.com Subject: Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Message-ID: <20170324075300.GC16730@lunn.ch> References: <1490088910-19405-1-git-send-email-sean.wang@mediatek.com> <1490088910-19405-6-git-send-email-sean.wang@mediatek.com> <20170323072233.GA10076@lunn.ch> <1490256416.14184.2.camel@mtkswgap22> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490256416.14184.2.camel@mtkswgap22> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 23, 2017 at 04:06:56PM +0800, Sean Wang wrote: > Hi Andrew, > > The purpose for the regmap table registered is to > > provide a way which helps us to look up a specific > > register on the switch through regmap-debugfs. > > > And not all ranges of register is defined > > so I only include the meaningful ones in a sparse way > > for the table. Many of there registers can be dumped using existing tools. You can dump the port registers using ethtool -r, if you implement get_regs/get_regs_len in your driver. mii-tool can dump the PHY registers. What you cannot see are global registers, so i can understand the usage of regmap-debugfs. However, i have a hard time with you only actually using the regmap for get/set for one small subset of registers. Either you need to use regmap to get/set all registers, or you remove it from the mainline driver, and keep it as a private patch which you use for your development work. For the Marvell driver we have an out of tree patch which exports a log of information via debugfs. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Date: Fri, 24 Mar 2017 08:53:00 +0100 Message-ID: <20170324075300.GC16730@lunn.ch> References: <1490088910-19405-1-git-send-email-sean.wang@mediatek.com> <1490088910-19405-6-git-send-email-sean.wang@mediatek.com> <20170323072233.GA10076@lunn.ch> <1490256416.14184.2.camel@mtkswgap22> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Landen.Chao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, keyhaede-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, objelf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org To: Sean Wang Return-path: Content-Disposition: inline In-Reply-To: <1490256416.14184.2.camel@mtkswgap22> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: netdev.vger.kernel.org On Thu, Mar 23, 2017 at 04:06:56PM +0800, Sean Wang wrote: > Hi Andrew, > > The purpose for the regmap table registered is to > > provide a way which helps us to look up a specific > > register on the switch through regmap-debugfs. > > > And not all ranges of register is defined > > so I only include the meaningful ones in a sparse way > > for the table. Many of there registers can be dumped using existing tools. You can dump the port registers using ethtool -r, if you implement get_regs/get_regs_len in your driver. mii-tool can dump the PHY registers. What you cannot see are global registers, so i can understand the usage of regmap-debugfs. However, i have a hard time with you only actually using the regmap for get/set for one small subset of registers. Either you need to use regmap to get/set all registers, or you remove it from the mainline driver, and keep it as a private patch which you use for your development work. For the Marvell driver we have an out of tree patch which exports a log of information via debugfs. Andrew