All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Subject: Important PM change for omap folks in v5.7-rc1
Date: Thu, 16 Apr 2020 13:30:45 -0700	[thread overview]
Message-ID: <20200416203045.GJ37466@atomide.com> (raw)

Hi all,

FYI, starting with v5.7-rc1, kernel serial console now must be detached
for the UARTs to idle. This has changed starting with commit a3cb39d258ef
("serial: core: Allow detach and attach serial device for console").

So folks may want to run something similar to the following on boot to
detach serial console and idle the UARTs for PM.

Regards,

Tony

8< -------------
#!/bin/sh

# Detach kernel serial console
consoles=$(find /sys/bus/platform/devices/4*.serial/ -name console)
for console in ${consoles}; do
	echo N > ${console}
done

# Configure PM runtime autosuspend
uarts=$(find /sys/bus/platform/devices/4*.serial/power/ -type d)
for uart in ${uarts}; do
	echo 1500 > ${uart}/autosuspend_delay_ms
	echo enabled > ${uart}/wakeup
	echo auto > ${uart}/control
done

# Configure wake-up from suspend
uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null)
for uart in ${uarts}; do
	echo enabled > ${uart}/wakeup
done

# Enable off mode during idle if supported
echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode

                 reply	other threads:[~2020-04-16 20:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200416203045.GJ37466@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.