Re: [PATCH v4 2/2] net: phy: adin: implement Energy Detect Powerdown mode via phy-tunable

2019-09-16 Thread Ardelean, Alexandru
On Sun, 2019-09-15 at 08:11 -0700, Florian Fainelli wrote: > [External] > > > > On 9/14/2019 8:29 AM, Andrew Lunn wrote: > > On Thu, Sep 12, 2019 at 07:28:12PM +0300, Alexandru Ardelean wrote: > > > > > +static int adin_set_edpd(struct phy_device *phydev, u16 tx_interval) > > > +{ > > > + u16

Re: [PATCH v4 2/2] net: phy: adin: implement Energy Detect Powerdown mode via phy-tunable

2019-09-15 Thread Florian Fainelli
On 9/14/2019 8:29 AM, Andrew Lunn wrote: > On Thu, Sep 12, 2019 at 07:28:12PM +0300, Alexandru Ardelean wrote: > >> +static int adin_set_edpd(struct phy_device *phydev, u16 tx_interval) >> +{ >> +u16 val; >> + >> +if (tx_interval == ETHTOOL_PHY_EDPD_DISABLE) >> +return

Re: [PATCH v4 2/2] net: phy: adin: implement Energy Detect Powerdown mode via phy-tunable

2019-09-14 Thread Andrew Lunn
On Thu, Sep 12, 2019 at 07:28:12PM +0300, Alexandru Ardelean wrote: > +static int adin_set_edpd(struct phy_device *phydev, u16 tx_interval) > +{ > + u16 val; > + > + if (tx_interval == ETHTOOL_PHY_EDPD_DISABLE) > + return phy_clear_bits(phydev, ADIN1300_PHY_CTRL_STATUS2, > +

[PATCH v4 2/2] net: phy: adin: implement Energy Detect Powerdown mode via phy-tunable

2019-09-12 Thread Alexandru Ardelean
This driver becomes the first user of the kernel's `ETHTOOL_PHY_EDPD` phy-tunable feature. EDPD is also enabled by default on PHY config_init, but can be disabled via the phy-tunable control. When enabling EDPD, it's also a good idea (for the ADIN PHYs) to enable TX periodic pulses, so that in