samples/net: Adding relevant parts to test PM on echo server
Just to get something to test for PM, via frdm_k64f board. So only this board will get PM enabled. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
839bacc0f0
commit
df368e8094
2 changed files with 7 additions and 0 deletions
|
@ -198,6 +198,11 @@ static int eth_mcux_device_pm_control(struct device *dev, u32_t command,
|
|||
if (*(u32_t *)context == DEVICE_PM_SUSPEND_STATE) {
|
||||
LOG_DBG("Suspending");
|
||||
|
||||
ret = net_if_suspend(eth_ctx->iface);
|
||||
if (ret == -EBUSY) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
eth_mcux_phy_enter_reset(eth_ctx);
|
||||
eth_mcux_phy_stop(eth_ctx);
|
||||
|
||||
|
|
2
samples/net/sockets/echo_server/boards/frdm_k64f.conf
Normal file
2
samples/net/sockets/echo_server/boards/frdm_k64f.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
CONFIG_SYS_POWER_MANAGEMENT=y
|
||||
CONFIG_DEVICE_POWER_MANAGEMENT=y
|
Loading…
Add table
Add a link
Reference in a new issue