]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: dp83867: fix irq generation
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 5 Jan 2017 20:48:07 +0000 (14:48 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Jan 2017 20:52:43 +0000 (15:52 -0500)
commit1e3165a9bf6cf5d7bb92226bd6842de392454562
treea3e13c40e1e0e4039c9e178013adcad2cbfaaeb7
parent280cd6d058f0d4108cbd6100784d71f84e9bb98f
net: phy: dp83867: fix irq generation

For proper IRQ generation by DP83867 phy the INT/PWDN pin has to be
programmed as an interrupt output instead of a Powerdown input in
Configuration Register 3 (CFG3), Address 0x001E, bit 7 INT_OE = 1. The
current driver doesn't do this and as result IRQs will not be generated by
DP83867 phy even if they are properly configured in DT.

Hence, fix IRQ generation by properly configuring CFG3.INT_OE bit and
ensure that Link Status Change (LINK_STATUS_CHNG_INT) and Auto-Negotiation
Complete (AUTONEG_COMP_INT) interrupt are enabled. After this the DP83867
driver will work properly in interrupt enabled mode.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/dp83867.c