Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: net: davinci_mdio: use pinctrl PM helpers

This utilize the new pinctrl core PM helpers to transition
the driver to "default" and "sleep" states.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Mugunthan V N and committed by
Linus Walleij
5c0e3580 739683b4

+10
+10
drivers/net/ethernet/ti/davinci_mdio.c
··· 38 38 #include <linux/davinci_emac.h> 39 39 #include <linux/of.h> 40 40 #include <linux/of_device.h> 41 + #include <linux/pinctrl/consumer.h> 41 42 42 43 /* 43 44 * This timeout definition is a worst-case ultra defensive measure against ··· 348 347 data->bus->parent = dev; 349 348 data->bus->priv = data; 350 349 350 + /* Select default pin state */ 351 + pinctrl_pm_select_default_state(&pdev->dev); 352 + 351 353 pm_runtime_enable(&pdev->dev); 352 354 pm_runtime_get_sync(&pdev->dev); 353 355 data->clk = clk_get(&pdev->dev, "fck"); ··· 458 454 data->suspended = true; 459 455 spin_unlock(&data->lock); 460 456 457 + /* Select sleep pin state */ 458 + pinctrl_pm_select_sleep_state(dev); 459 + 461 460 return 0; 462 461 } 463 462 ··· 468 461 { 469 462 struct davinci_mdio_data *data = dev_get_drvdata(dev); 470 463 u32 ctrl; 464 + 465 + /* Select default pin state */ 466 + pinctrl_pm_select_default_state(dev); 471 467 472 468 spin_lock(&data->lock); 473 469 pm_runtime_get_sync(data->dev);