From: Stephen Rothwell Date: Wed, 19 Jun 2013 05:47:19 +0000 (+1000) Subject: Merge remote-tracking branch 'pinctrl/for-next' X-Git-Tag: next-20130619~20 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c18f89fa54f73063bfafa3667314b1a4b4ef6b85;p=karo-tx-linux.git Merge remote-tracking branch 'pinctrl/for-next' Conflicts: drivers/net/ethernet/ti/davinci_mdio.c --- c18f89fa54f73063bfafa3667314b1a4b4ef6b85 diff --cc drivers/net/ethernet/ti/davinci_mdio.c index c47f0dbcebb5,5e361f411ea4..ce7c4991e41c --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@@ -449,22 -453,32 +453,28 @@@ static int davinci_mdio_suspend(struct __raw_writel(ctrl, &data->regs->control); wait_for_idle(data); - pm_runtime_put_sync(data->dev); - data->suspended = true; spin_unlock(&data->lock); + pm_runtime_put_sync(data->dev); + /* Select sleep pin state */ + pinctrl_pm_select_sleep_state(dev); + return 0; } static int davinci_mdio_resume(struct device *dev) { struct davinci_mdio_data *data = dev_get_drvdata(dev); - u32 ctrl; + /* Select default pin state */ + pinctrl_pm_select_default_state(dev); + - spin_lock(&data->lock); pm_runtime_get_sync(data->dev); + spin_lock(&data->lock); /* restart the scan state machine */ - ctrl = __raw_readl(&data->regs->control); - ctrl |= CONTROL_ENABLE; - __raw_writel(ctrl, &data->regs->control); + __davinci_mdio_reset(data); data->suspended = false; spin_unlock(&data->lock);