diff options
author | 2016-06-15 11:32:21 -0700 | |
---|---|---|
committer | 2016-06-16 14:14:58 -0700 | |
commit | cecbc5563a02289164fa6379130243cbe08b2dd6 (patch) | |
tree | b7a37d0b6e44dcddc076bc52e1a6620814179eea /include/linux/stmmac.h | |
parent | sctp: change sk state to CLOSED instead of CLOSING in sctp_sock_migrate (diff) | |
download | linux-cecbc5563a02289164fa6379130243cbe08b2dd6.tar.gz linux-cecbc5563a02289164fa6379130243cbe08b2dd6.tar.bz2 linux-cecbc5563a02289164fa6379130243cbe08b2dd6.zip |
net: stmmac: allow to split suspend/resume from init/exit callbacks
Let the stmmac platform drivers provide dedicated suspend and resume
callbacks rather than always re-using the init and exits callbacks.
If the driver does not provide the suspend or resume callback, we fall
back to the old behavior trying to use exit or init.
This allows a specific platform to perform only a partial power-down on
suspend if Wake-on-Lan is enabled but always perform the full shutdown
sequence if the module is unloaded.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/stmmac.h')
-rw-r--r-- | include/linux/stmmac.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index ffdaca9c01af..0507dbfbf63c 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -135,6 +135,8 @@ struct plat_stmmacenet_data { void (*bus_setup)(void __iomem *ioaddr); int (*init)(struct platform_device *pdev, void *priv); void (*exit)(struct platform_device *pdev, void *priv); + void (*suspend)(struct platform_device *pdev, void *priv); + void (*resume)(struct platform_device *pdev, void *priv); void *bsp_priv; struct stmmac_axi *axi; int has_gmac4; |