net: dsa: mt7530: refactor SGMII PCS creation
authorDaniel Golle <daniel@makrotopia.org>
Mon, 3 Apr 2023 01:17:30 +0000 (02:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2023 09:13:00 +0000 (10:13 +0100)
commit9ecc00164dc2300dfcd40afe549a8ee951dfea9f
tree7045f05a061b109b75621281424026051c048c67
parentb6f56cddb5f57a0b8da0ce582232a2f1933558c6
net: dsa: mt7530: refactor SGMII PCS creation

Instead of macro templates use a dedidated function and allocated
regmap_config when creating the regmaps for the pcs-mtk-lynxi
instances.
This is in preparation to switching to use unlocked regmap accessors
and have regmap's locking API handle locking for us.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c