RE: [v5] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude configurable
From: Holger Brunck <hidden>
Date: 2022-02-09 13:23:42
quoted
@@ -3178,6 +3181,25 @@ static int mv88e6xxx_setup_port(structmv88e6xxx_chip *chip, int port)quoted
return err; } + if (chip->info->ops->serdes_set_tx_p2p_amplitude) { + dp = dsa_to_port(ds, port); + if (dp) + phy_handle = of_parse_phandle(dp->dn, + "phy-handle", 0); + + if (phy_handle && !of_property_read_u32(phy_handle, + "tx-p2p-microvolt", + &tx_amp)) { + err = mv88e6352_serdes_set_tx_p2p_amplitude(chip, port, + + tx_amp);You should use err = chip->info->ops->serdes_set_tx_p2p_amplitude(...); instead of err = mv88e6352_serdes_set_tx_p2p_amplitude(...); since you are adding this operation to the operations structure and since mv88e6xxx_setup_port() is a generic method.
ah sure that makes sense, so that others can add other implementations.
Sorry, I overlooked this in v4 :-(
no problem. I wait another day for other inputs and then send an update. Best regards Holger