On Wed, 9 Feb 2022 10:54:27 +0100
Holger Brunck [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -3178,6 +3181,25 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
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.
Sorry, I overlooked this in v4 :-(
Marek