[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0PR0602MB3666CDA52930B908ADD5D37DF72E9@AM0PR0602MB3666.eurprd06.prod.outlook.com>
Date: Wed, 9 Feb 2022 13:23:35 +0000
From: Holger Brunck <holger.brunck@...achienergy.com>
To: Marek BehĂșn <kabel@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>
Subject: RE: [v5] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude
configurable
> > @@ -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.
>
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
Powered by blists - more mailing lists