From: Zhou Furong <furong.zhou@linux.intel.com>
To: alexandru.tachici@analog.com
Cc: andrew@lunn.ch, o.rempel@pengutronix.de, davem@davemloft.net,
devicetree@vger.kernel.org, hkallweit1@gmail.com,
kuba@kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux@armlinux.org.uk, netdev@vger.kernel.org,
robh+dt@kernel.org,
Alexandru Ardelean <alexandru.ardelean@analog.com>,
Ramon Fried <rfried.dev@gmail.com>
Subject: Re: [PATCH v5 5/7] net: phy: adin1100: Add initial support for ADIN1100 industrial PHY
Date: Tue, 12 Apr 2022 08:17:55 +0800 [thread overview]
Message-ID: <cca8a37b-a648-52ba-c14c-1e1078bc628e@linux.intel.com> (raw)
In-Reply-To: <CAGi-RUJLmT-jfjtaYvPjaNHX-QCohhkZ3rkXaHHbmOHk56jTaA@mail.gmail.com>
Hi,
>> +static int adin_config_aneg(struct phy_device *phydev)
>> +{
>> + struct adin_priv *priv = phydev->priv;
>> + int ret;
>> +
>> + if (phydev->autoneg == AUTONEG_DISABLE) {
>> + ret = genphy_c45_pma_setup_forced(phydev);
>> + if (ret < 0)
>> + return ret;
>> +
>> + if (priv->tx_level_prop_present && priv->tx_level_2v4) {
>> + ret = phy_set_bits_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_B10L_PMA_CTRL,
>> + MDIO_PMA_10T1L_CTRL_2V4_EN);
>> + if (ret < 0)
>> + return ret;
>> + } else {
>> + ret = phy_clear_bits_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_B10L_PMA_CTRL,
>> + MDIO_PMA_10T1L_CTRL_2V4_EN);
>> + if (ret < 0)
>> + return ret;
>> + }
move below out if/else
if(ret < 0)
return ret;
>> +static int adin_set_powerdown_mode(struct phy_device *phydev, bool en)
>> +{
>> + int ret;
>> + int val;
>> +
>> + if (en)
>> + val = ADIN_CRSM_SFT_PD_CNTRL_EN;
>> + else
>> + val = 0;please consider below change which looks neat
val = en? ADIN_CRSM_SFT_PD_CNTRL_EN : 0
Best regards,
Furong
next prev parent reply other threads:[~2022-04-12 0:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 11:26 [PATCH v5 0/7] net: phy: adin1100: Add initial support for ADIN1100 industrial PHY alexandru.tachici
2022-03-24 11:26 ` [PATCH v5 1/7] ethtool: Add 10base-T1L link mode entry alexandru.tachici
2022-03-24 11:26 ` [PATCH v5 2/7] net: phy: Add 10-BaseT1L registers alexandru.tachici
2022-03-24 11:26 ` [PATCH v5 3/7] net: phy: Add BaseT1 auto-negotiation registers alexandru.tachici
2022-03-24 11:26 ` [PATCH v5 4/7] net: phy: Add 10BASE-T1L support in phy-c45 alexandru.tachici
2022-03-24 11:26 ` [PATCH v5 5/7] net: phy: adin1100: Add initial support for ADIN1100 industrial PHY alexandru.tachici
2022-04-10 5:11 ` Ramon Fried
2022-04-10 5:12 ` Ramon Fried
2022-04-12 0:17 ` Zhou Furong [this message]
2022-03-24 11:26 ` [PATCH v5 6/7] net: phy: adin1100: Add SQI support alexandru.tachici
2022-03-24 11:26 ` [PATCH v5 7/7] dt-bindings: net: phy: Add 10-baseT1L 2.4 Vpp alexandru.tachici
2022-03-24 23:00 ` [PATCH v5 0/7] net: phy: adin1100: Add initial support for ADIN1100 industrial PHY Jakub Kicinski
2022-04-07 12:05 ` Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cca8a37b-a648-52ba-c14c-1e1078bc628e@linux.intel.com \
--to=furong.zhou@linux.intel.com \
--cc=alexandru.ardelean@analog.com \
--cc=alexandru.tachici@analog.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=rfried.dev@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).