[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220209170845.784ba000@dellmb>
Date: Wed, 9 Feb 2022 17:08:45 +0100
From: Marek BehĂșn <kabel@...nel.org>
To: Holger Brunck <holger.brunck@...achienergy.com>
Cc: Andrew Lunn <andrew@...n.ch>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [v5] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude
configurable
On Wed, 9 Feb 2022 15:04:56 +0000
Holger Brunck <holger.brunck@...achienergy.com> wrote:
> > > + 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);
> > > + if (err) {
> > > + of_node_put(phy_handle);
> > > + return err;
> > > + }
> >
> > You could move this test
> >
> > > + }
> > > + if (phy_handle)
> > > + of_node_put(phy_handle);
> >
> > to here, since you need to put the phy_handle anyway.
> >
>
> ok. I think I will also rename the ...set_tx_p2p_amplitude to ...set_tx_p2p to
> shorten the function names. Makes it easier to read.
Please don't drop "amplitude". If anything, drop the "p2p".
Marek
Powered by blists - more mailing lists