As a first step into making phylib and all PHY drivers to actually
have support for shared IRQs, make the .ack_interrupt() callback
optional.

After all drivers have been moved to implement the generic
interrupt handle, the phy_drv_supports_irq() check will be
changed again to only require the .handle_interrupts() callback.

Cc: Alexandru Ardelean <alexandru.ardel...@analog.com>
Cc: Andre Edich <andre.ed...@microchip.com>
Cc: Antoine Tenart <aten...@kernel.org>
Cc: Baruch Siach <bar...@tkos.co.il>
Cc: Christophe Leroy <christophe.le...@c-s.fr>
Cc: Dan Murphy <dmur...@ti.com>
Cc: Divya Koppera <divya.kopp...@microchip.com>
Cc: Florian Fainelli <f.faine...@gmail.com>
Cc: Hauke Mehrtens <ha...@hauke-m.de>
Cc: Heiner Kallweit <hkallwe...@gmail.com>
Cc: Jerome Brunet <jbru...@baylibre.com>
Cc: Kavya Sree Kotagiri <kavyasree.kotag...@microchip.com>
Cc: Linus Walleij <linus.wall...@linaro.org>
Cc: Marco Felsch <m.fel...@pengutronix.de>
Cc: Marek Vasut <ma...@denx.de>
Cc: Martin Blumenstingl <martin.blumensti...@googlemail.com>
Cc: Mathias Kresin <d...@kresin.me>
Cc: Maxim Kochetkov <fido_...@inbox.ru>
Cc: Michael Walle <mich...@walle.cc>
Cc: Neil Armstrong <narmstr...@baylibre.com>
Cc: Nisar Sayed <nisar.sa...@microchip.com>
Cc: Oleksij Rempel <o.rem...@pengutronix.de>
Cc: Philippe Schenker <philippe.schen...@toradex.com>
Cc: Willy Liu <willy....@realtek.com>
Cc: Yuiko Oshino <yuiko.osh...@microchip.com>
Signed-off-by: Ioana Ciornei <ioana.cior...@nxp.com>
---
 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 413a0a2c5d51..f54f483d7fd6 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2815,7 +2815,7 @@ EXPORT_SYMBOL(phy_get_internal_delay);
 
 static bool phy_drv_supports_irq(struct phy_driver *phydrv)
 {
-       return phydrv->config_intr && phydrv->ack_interrupt;
+       return phydrv->config_intr && (phydrv->ack_interrupt || 
phydrv->handle_interrupt);
 }
 
 /**
-- 
2.28.0

Reply via email to