linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
	David Jander <david@protonic.nl>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
	mkl@pengutronix.de, Marek Vasut <marex@denx.de>,
	linux-can@vger.kernel.org
Subject: [RFC PATCH v1 3/6] net: phy: add CAN interface mode
Date: Fri, 23 Oct 2020 12:56:23 +0200	[thread overview]
Message-ID: <20201023105626.6534-4-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20201023105626.6534-1-o.rempel@pengutronix.de>

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/phy/phy.c | 2 ++
 include/linux/phy.h   | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 35525a671400..4fb355df3e61 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -324,6 +324,8 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev,
 	cmd->base.master_slave_state = phydev->master_slave_state;
 	if (phydev->interface == PHY_INTERFACE_MODE_MOCA)
 		cmd->base.port = PORT_BNC;
+	else if (phydev->interface == PHY_INTERFACE_MODE_CAN)
+		cmd->base.port = PORT_OTHER;
 	else
 		cmd->base.port = PORT_MII;
 	cmd->base.transceiver = phy_is_internal(phydev) ?
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 92225fc0d105..c5d8628cecf3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -144,6 +144,7 @@ typedef enum {
 	PHY_INTERFACE_MODE_USXGMII,
 	/* 10GBASE-KR - with Clause 73 AN */
 	PHY_INTERFACE_MODE_10GKR,
+	PHY_INTERFACE_MODE_CAN,
 	PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
 
@@ -225,6 +226,8 @@ static inline const char *phy_modes(phy_interface_t interface)
 		return "usxgmii";
 	case PHY_INTERFACE_MODE_10GKR:
 		return "10gbase-kr";
+	case PHY_INTERFACE_MODE_CAN:
+		return "can";
 	default:
 		return "unknown";
 	}
-- 
2.28.0


  parent reply	other threads:[~2020-10-23 10:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 10:56 [RFC PATCH v1 0/6] add initial CAN PHY support Oleksij Rempel
2020-10-23 10:56 ` [RFC PATCH v1 1/6] net: phy: add CAN PHY Virtual Bus Oleksij Rempel
2020-10-23 20:18   ` Andrew Lunn
2020-10-23 20:53   ` Andrew Lunn
2020-10-23 10:56 ` [RFC PATCH v1 2/6] net: phy: add a driver for generic CAN PHYs Oleksij Rempel
2020-10-23 10:56 ` Oleksij Rempel [this message]
2020-10-23 20:24   ` [RFC PATCH v1 3/6] net: phy: add CAN interface mode Andrew Lunn
2020-10-23 10:56 ` [RFC PATCH v1 4/6] net: add CAN specific link modes Oleksij Rempel
2020-10-23 10:56 ` [RFC PATCH v1 5/6] can: flexcan: add phylink support Oleksij Rempel
2020-10-23 10:56 ` [RFC PATCH v1 6/6] can: flexcan: add ethtool support Oleksij Rempel
2020-10-23 11:45 ` [RFC PATCH v1 0/6] add initial CAN PHY support Russell King - ARM Linux admin
2020-10-23 12:14   ` Marc Kleine-Budde
2020-10-23 12:22     ` Russell King - ARM Linux admin
2020-10-23 13:04       ` Marc Kleine-Budde
2020-10-23 20:30 ` Andrew Lunn

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=20201023105626.6534-4-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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).