summaryrefslogtreecommitdiff
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-05-30 15:10:06 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-30 15:02:33 -0700
commit49644e68f472c6480e015253fa4d7448c6cfa2aa (patch)
treed47976e1630e2a72dee58c18c2c084dd5ca0bdfc /include/linux/phy.h
parent07b0928918c694c845a387cc16256a8b63ced4fc (diff)
net: phy: add callback for custom interrupt handler to struct phy_driver
The phylib interrupt handler handles link change events only currently. However PHY drivers may want to use other interrupt sources too, e.g. to report temperature monitoring events. Therefore add a callback to struct phy_driver allowing PHY drivers to implement a custom interrupt handler. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Suggested-by: Russell King - ARM Linux admin <linux@armlinux.org.uk> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 72e1196f9799..16cd33915496 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -537,6 +537,9 @@ struct phy_driver {
*/
int (*did_interrupt)(struct phy_device *phydev);
+ /* Override default interrupt handling */
+ int (*handle_interrupt)(struct phy_device *phydev);
+
/* Clears up any memory if needed */
void (*remove)(struct phy_device *phydev);