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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -537,6 +537,9 @@ struct phy_driver { · 536 unmodified lines | ||
| 537 | 537 | */ |
| 538 | 538 | int (*did_interrupt)(struct phy_device *phydev); |
| 539 | 539 | |
| 540 | + /* Override default interrupt handling */ | |
| 541 | + int (*handle_interrupt)(struct phy_device *phydev); | |
| 542 | + | |
| 540 | 543 | /* Clears up any memory if needed */ |
| 541 | 544 | void (*remove)(struct phy_device *phydev); |
| 542 | 545 | |