]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: icplus: add config_intr callback
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 11 Nov 2018 20:49:12 +0000 (21:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2018 17:30:00 +0000 (09:30 -0800)
commit84722736cc0b61bc08be5755ba1f2cf9082b9a47
tree7affa25cde1839f873613a3147c1e2abd7638976
parent4c7212c362f51abec9294680424bb5d1fc3adaba
net: phy: icplus: add config_intr callback

Move IRQ configuration for IP101A/G from config_init to config_intr
callback. Reasons:

1. This allows phylib to disable interrupts if needed.
2. Icplus was the only driver supporting interrupts w/o defining a
   config_intr callback. Now we can add a phylib plausibility check
   disabling interrupt mode if one of the two irq-related callbacks
   isn't defined.

I don't own hardware with this PHY, and the change is based on the
datasheet for IP101A LF (which is supposed to be register-compatible
with IP101A/G). Change is compile-tested only.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/icplus.c