[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0PR0602MB36665CE967134A8C8D999078F72D9@AM0PR0602MB3666.eurprd06.prod.outlook.com>
Date: Tue, 8 Feb 2022 18:49:07 +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: [v4] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude
configurable
> > @@ -3011,6 +3014,22 @@ 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);
>
> two spaces after '=' operator, only one needed
>
ok
> > + 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)
> > + return err;
> > + }
>
> you need to decrease reference of the phy_handle you just got with
> of_parse_phandle:
>
> if (phy_handle)
> of_node_put(phy_handle);
>
ok
> > + }
> > +
>
> > +struct mv88e6352_serdes_p2p_to_val {
> > + int mv;
> > + u16 regval;
> > +};
> > +
> > +static struct mv88e6352_serdes_p2p_to_val
> mv88e6352_serdes_p2p_to_val[] = {
> > + /* Mapping of configurable mikrovolt values to the register value */
> > + { 14000, 0},
> > + { 112000, 1},
> > + { 210000, 2},
> > + { 308000, 3},
> > + { 406000, 4},
> > + { 504000, 5},
> > + { 602000, 6},
> > + { 700000, 7},
>
> add spaces before ending '}'
>
hm, why didn't checkpatch complained? Anyhow I need to do changes here anyhow.
Thanks
Holger
Powered by blists - more mailing lists