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 Content-Length: 1058 Lines: 31 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