lkml.org 
[lkml]   [2017]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch
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

\
 
 \ /
  Last update: 2017-03-24 08:59    [W:1.977 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site