linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH V4] net: phy: tja11xx: Add TJA11xx PHY driver
Date: Fri, 04 Jan 2019 08:24:59 -0800	[thread overview]
Message-ID: <E29570D9-3298-443A-8809-7E5BC4147FCD@gmail.com> (raw)
In-Reply-To: <20190104021547.15527-1-marex@denx.de>




On January 3, 2019 6:15:47 PM PST, Marek Vasut <ma...@denx.de> wrote:
>Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special
>BroadRReach 100BaseT1 PHYs used in automotive.
>
>Signed-off-by: Marek Vasut <ma...@denx.de>
>Cc: Andrew Lunn <and...@lunn.ch>
>Cc: Florian Fainelli <f.faine...@gmail.com>
>Cc: Guenter Roeck <li...@roeck-us.net>
>Cc: Heiner Kallweit <hkallwe...@gmail.com>
>Cc: Jean Delvare <jdelv...@suse.com>
>Cc: linux-hwmon@vger.kernel.org
>---
>V2: - Use phy_modify(), phy_{set,clear}_bits()
>    - Drop enable argument of tja11xx_enable_link_control()
>    - Use PHY_BASIC_T1_FEATURES and dont modify supported/advertised
>      features in config_init callback
>    - Use genphy_soft_reset() instead of opencoding the reset sequence.
>    - Drop the aneg parts, since the PHY datasheet claims it does not
>      support aneg
>V3: - Replace clr with mask
>    - Add hwmon support
>    - Check commstat in tja11xx_read_status() only if link is up
>    - Use PHY_ID_MATCH_MODEL()
>V4: - Use correct bit in tja11xx_hwmon_read() hwmon_temp_crit_alarm
>    - Use ENOMEM if devm_kstrdup() fails
>    - Check $type in tja11xx_hwmon_read() in addition to $attr
>---

[Snip]

>+      ret = tja11xx_enable_reg_write(phydev);
>+      if (ret)
>+              return ret;
>+
>+      phydev->irq = PHY_POLL;

The PHY driver should not be imposing that, leave it up to the platform 
configuration to set that.

>+      phydev->autoneg = AUTONEG_DISABLE;
>+      phydev->speed = SPEED_100;
>+      phydev->duplex = DUPLEX_FULL;
>+      phydev->pause = 0;
>+      phydev->asym_pause = 0;

Are any of those necessary if you set basic T1 features?

Everything else looks good to me. Thanks!
-- 
Florian

WARNING: multiple messages have this Message-ID (diff)
From: Florian Fainelli <f.fainelli@gmail.com>
To: Marek Vasut <marex@denx.de>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>, Guenter Roeck <linux@roeck-us.net>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH V4] net: phy: tja11xx: Add TJA11xx PHY driver
Date: Fri, 04 Jan 2019 08:24:19 -0800	[thread overview]
Message-ID: <E29570D9-3298-443A-8809-7E5BC4147FCD@gmail.com> (raw)
Message-ID: <20190104162419.uPKR-Rr26krJ9Aq93Qb9SimSlPszF6rjyvPTYGtLOGM@z> (raw)
In-Reply-To: <20190104021547.15527-1-marex@denx.de>



On January 3, 2019 6:15:47 PM PST, Marek Vasut <marex@denx.de> wrote:
>Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special
>BroadRReach 100BaseT1 PHYs used in automotive.
>
>Signed-off-by: Marek Vasut <marex@denx.de>
>Cc: Andrew Lunn <andrew@lunn.ch>
>Cc: Florian Fainelli <f.fainelli@gmail.com>
>Cc: Guenter Roeck <linux@roeck-us.net>
>Cc: Heiner Kallweit <hkallweit1@gmail.com>
>Cc: Jean Delvare <jdelvare@suse.com>
>Cc: linux-hwmon@vger.kernel.org
>---
>V2: - Use phy_modify(), phy_{set,clear}_bits()
>    - Drop enable argument of tja11xx_enable_link_control()
>    - Use PHY_BASIC_T1_FEATURES and dont modify supported/advertised
>      features in config_init callback
>    - Use genphy_soft_reset() instead of opencoding the reset sequence.
>    - Drop the aneg parts, since the PHY datasheet claims it does not
>      support aneg
>V3: - Replace clr with mask
>    - Add hwmon support
>    - Check commstat in tja11xx_read_status() only if link is up
>    - Use PHY_ID_MATCH_MODEL()
>V4: - Use correct bit in tja11xx_hwmon_read() hwmon_temp_crit_alarm
>    - Use ENOMEM if devm_kstrdup() fails
>    - Check $type in tja11xx_hwmon_read() in addition to $attr
>---

[Snip]

>+	ret = tja11xx_enable_reg_write(phydev);
>+	if (ret)
>+		return ret;
>+
>+	phydev->irq = PHY_POLL;

The PHY driver should not be imposing that, leave it up to the platform configuration to set that.

>+	phydev->autoneg = AUTONEG_DISABLE;
>+	phydev->speed = SPEED_100;
>+	phydev->duplex = DUPLEX_FULL;
>+	phydev->pause = 0;
>+	phydev->asym_pause = 0;

Are any of those necessary if you set basic T1 features?

Everything else looks good to me. Thanks!
-- 
Florian

  reply	other threads:[~2019-01-04 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04  2:15 [PATCH V4] net: phy: tja11xx: Add TJA11xx PHY driver Marek Vasut
2019-01-04 16:24 ` Florian Fainelli [this message]
2019-01-04 16:24   ` Florian Fainelli
2019-01-04 19:29 ` Marek Vasut
2019-01-04 19:27   ` Marek Vasut

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=E29570D9-3298-443A-8809-7E5BC4147FCD@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=linux-hwmon@vger.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).