[PATCH net-next] net: dsa: mt7530: Add debugfs support

Lorenzo Bianconi lorenzo at kernel.org
Wed May 29 08:06:36 PDT 2024


> Hi Lorenzo,
> 
> On Wed, May 29, 2024 at 12:54:37PM +0200, Lorenzo Bianconi wrote:
> > Introduce debugfs support for mt7530 dsa switch.
> > Add the capability to read or write device registers through debugfs:
> > 
> > $echo 0x7ffc > regidx
> > $cat regval
> > 0x75300000
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
> > ---
> 
> Apart from the obvious NACK on permitting user space to alter random
> registers outside of the driver's control.
> 
> Have you looked at /sys/kernel/debug/regmap/? Or at ethtool --register-dump?

ack, regmap sysfs is fine to dump registers value.
It was just very handy for me to have the capability to change registers
during development (moreover we already have something similar in mt76).
Anyway it is probably something more related to development so I do not
have a strong opinion on it and we discard the patch.

Regards,
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20240529/77d6941c/attachment.sig>


More information about the Linux-mediatek mailing list