From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-omap@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Dave Gerlach <d-gerlach@ti.com>, Nishanth Menon <nm@ti.com>
Subject: [PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend
Date: Thu, 6 Nov 2014 20:07:30 +0100 [thread overview]
Message-ID: <1415300850-21452-1-git-send-email-bigeasy@linutronix.de> (raw)
This is mostly an equivalent for the 8250-omap driver based on a patch
of Dave Gerlach for the omap-serial driver (which is not yet merged).
>From his changelog:
|By optionally putting the pins into sleep state in the suspend callback
|we can accomplish two things.
|- minimize current leakage from pins and thus save power,
|- prevent the IP from driving pins output in an uncontrolled manner,
| which may happen if the power domain drops the domain regulator.
The pinctlr change is put before enable_wakeup logic as per Nishanth
Menon (slightly reworded):
|When wakeup is enabled, I/O daisy chain based wakeup is used by
|reconfiguring the padconfig register. However, this gets overriden by
|sleep/wakeup configuration. Therefore we need first to allow pinctrl to
|play with the wakeup bits as needed beyond the sleep configuration.
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/tty/serial/8250/8250_omap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 57a8b1241b85..1681875f2996 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1156,6 +1156,7 @@ static int omap8250_suspend(struct device *dev)
serial8250_suspend_port(priv->line);
flush_work(&priv->qos_work);
+ pinctrl_pm_select_sleep_state(dev);
if (device_may_wakeup(dev))
omap8250_enable_wakeup(priv, true);
else
@@ -1167,6 +1168,7 @@ static int omap8250_resume(struct device *dev)
{
struct omap8250_priv *priv = dev_get_drvdata(dev);
+ pinctrl_pm_select_default_state(dev);
if (device_may_wakeup(dev))
omap8250_enable_wakeup(priv, false);
--
2.1.1
next reply other threads:[~2014-11-06 19:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 19:07 Sebastian Andrzej Siewior [this message]
2014-11-06 19:15 ` [PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend Nishanth Menon
2014-11-06 19:42 ` Sebastian Andrzej Siewior
2014-11-06 19:57 ` Nishanth Menon
2014-11-06 20:35 ` Tony Lindgren
2014-11-25 18:05 ` Sebastian Andrzej Siewior
2014-11-25 18:22 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415300850-21452-1-git-send-email-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=d-gerlach@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nm@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).