All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: vitesse: add support for VSC8601
@ 2015-11-12 18:41 Mans Rullgard
  2015-11-12 19:15 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mans Rullgard @ 2015-11-12 18:41 UTC (permalink / raw)
  To: Florian Fainelli, netdev, linux-kernel

This adds support for the Vitesse VSC8601 PHY. Generic functions are
used for everything except interrupt handling.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 drivers/net/phy/vitesse.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 76cad71..dd295db 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -66,6 +66,7 @@
 #define PHY_ID_VSC8244			0x000fc6c0
 #define PHY_ID_VSC8514			0x00070670
 #define PHY_ID_VSC8574			0x000704a0
+#define PHY_ID_VSC8601			0x00070420
 #define PHY_ID_VSC8662			0x00070660
 #define PHY_ID_VSC8221			0x000fc550
 #define PHY_ID_VSC8211			0x000fc4b0
@@ -133,7 +134,8 @@ static int vsc82xx_config_intr(struct phy_device *phydev)
 			(phydev->drv->phy_id == PHY_ID_VSC8234 ||
 			 phydev->drv->phy_id == PHY_ID_VSC8244 ||
 			 phydev->drv->phy_id == PHY_ID_VSC8514 ||
-			 phydev->drv->phy_id == PHY_ID_VSC8574) ?
+			 phydev->drv->phy_id == PHY_ID_VSC8574 ||
+			 phydev->drv->phy_id == PHY_ID_VSC8601) ?
 				MII_VSC8244_IMASK_MASK :
 				MII_VSC8221_IMASK_MASK);
 	else {
@@ -272,6 +274,18 @@ static struct phy_driver vsc82xx_driver[] = {
 	.config_intr    = &vsc82xx_config_intr,
 	.driver         = { .owner = THIS_MODULE,},
 }, {
+	.phy_id         = PHY_ID_VSC8601,
+	.name           = "Vitesse VSC8601",
+	.phy_id_mask    = 0x000ffff0,
+	.features       = PHY_GBIT_FEATURES,
+	.flags          = PHY_HAS_INTERRUPT,
+	.config_init    = &genphy_config_init,
+	.config_aneg    = &genphy_config_aneg,
+	.read_status    = &genphy_read_status,
+	.ack_interrupt  = &vsc824x_ack_interrupt,
+	.config_intr    = &vsc82xx_config_intr,
+	.driver         = { .owner = THIS_MODULE,},
+}, {
 	.phy_id         = PHY_ID_VSC8662,
 	.name           = "Vitesse VSC8662",
 	.phy_id_mask    = 0x000ffff0,
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: phy: vitesse: add support for VSC8601
  2015-11-12 18:41 [PATCH] net: phy: vitesse: add support for VSC8601 Mans Rullgard
@ 2015-11-12 19:15 ` Florian Fainelli
  2015-11-13  8:51 ` Mason
  2015-11-16 19:19 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2015-11-12 19:15 UTC (permalink / raw)
  To: Mans Rullgard, netdev, linux-kernel

On 12/11/15 10:41, Mans Rullgard wrote:
> This adds support for the Vitesse VSC8601 PHY. Generic functions are
> used for everything except interrupt handling.
> 
> Signed-off-by: Mans Rullgard <mans@mansr.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: phy: vitesse: add support for VSC8601
  2015-11-12 18:41 [PATCH] net: phy: vitesse: add support for VSC8601 Mans Rullgard
  2015-11-12 19:15 ` Florian Fainelli
@ 2015-11-13  8:51 ` Mason
  2015-11-13 10:06   ` Måns Rullgård
  2015-11-16 19:19 ` David Miller
  2 siblings, 1 reply; 5+ messages in thread
From: Mason @ 2015-11-13  8:51 UTC (permalink / raw)
  To: Mans Rullgard; +Cc: Florian Fainelli, netdev, linux-kernel

On 12/11/2015 19:41, Mans Rullgard wrote:

> +	.phy_id         = PHY_ID_VSC8601,
> +	.name           = "Vitesse VSC8601",
> +	.phy_id_mask    = 0x000ffff0,
> +	.features       = PHY_GBIT_FEATURES,
> +	.flags          = PHY_HAS_INTERRUPT,
> +	.config_init    = &genphy_config_init,
> +	.config_aneg    = &genphy_config_aneg,
> +	.read_status    = &genphy_read_status,
> +	.ack_interrupt  = &vsc824x_ack_interrupt,
> +	.config_intr    = &vsc82xx_config_intr,

I expected Documentation/CodingStyle to forbid taking the address
of functions.

Regards.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: phy: vitesse: add support for VSC8601
  2015-11-13  8:51 ` Mason
@ 2015-11-13 10:06   ` Måns Rullgård
  0 siblings, 0 replies; 5+ messages in thread
From: Måns Rullgård @ 2015-11-13 10:06 UTC (permalink / raw)
  To: Mason; +Cc: Florian Fainelli, netdev, linux-kernel

Mason <slash.tmp@free.fr> writes:

> On 12/11/2015 19:41, Mans Rullgard wrote:
>
>> +	.phy_id         = PHY_ID_VSC8601,
>> +	.name           = "Vitesse VSC8601",
>> +	.phy_id_mask    = 0x000ffff0,
>> +	.features       = PHY_GBIT_FEATURES,
>> +	.flags          = PHY_HAS_INTERRUPT,
>> +	.config_init    = &genphy_config_init,
>> +	.config_aneg    = &genphy_config_aneg,
>> +	.read_status    = &genphy_read_status,
>> +	.ack_interrupt  = &vsc824x_ack_interrupt,
>> +	.config_intr    = &vsc82xx_config_intr,
>
> I expected Documentation/CodingStyle to forbid taking the address
> of functions.

I can't find anything to that effect.  That said, it's not something I
would normally do, but all the other phy_driver entries in that file
look like that.

-- 
Måns Rullgård
mans@mansr.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: phy: vitesse: add support for VSC8601
  2015-11-12 18:41 [PATCH] net: phy: vitesse: add support for VSC8601 Mans Rullgard
  2015-11-12 19:15 ` Florian Fainelli
  2015-11-13  8:51 ` Mason
@ 2015-11-16 19:19 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-11-16 19:19 UTC (permalink / raw)
  To: mans; +Cc: f.fainelli, netdev, linux-kernel

From: Mans Rullgard <mans@mansr.com>
Date: Thu, 12 Nov 2015 18:41:12 +0000

> This adds support for the Vitesse VSC8601 PHY. Generic functions are
> used for everything except interrupt handling.
> 
> Signed-off-by: Mans Rullgard <mans@mansr.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-16 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 18:41 [PATCH] net: phy: vitesse: add support for VSC8601 Mans Rullgard
2015-11-12 19:15 ` Florian Fainelli
2015-11-13  8:51 ` Mason
2015-11-13 10:06   ` Måns Rullgård
2015-11-16 19:19 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.