linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/4] Get rid of pm_runtime_irq_safe() for 8250_omap
@ 2021-10-15 11:26 Tony Lindgren
  2021-10-15 11:26 ` [PATCH 1/4] serial: core: Add wakeup() and start_pending_tx() for power management Tony Lindgren
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Tony Lindgren @ 2021-10-15 11:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Andy Shevchenko, Jiri Slaby, Johan Hovold, Vignesh Raghavendra,
	linux-serial, linux-omap, linux-kernel

Hi,

Here are v3 patches to get rid of pm_runtime_irq_safe() for the 8250_omap
driver. Based on comments from Andy, Johan and Greg, I improved a bunch of
things as listed below.

For removing the pm_runtime_irq_safe() usage, serial TX is the last
remaining issue. We deal with TX by waking up the port and returning 0
bytes written from write_room() and write() if the port is not available
because of PM runtime autoidle.

This series also removes the dependency to Andy's pending generic serial
layer PM runtime patches, and hopefully makes that work a bit easier :)

Regards,

Tony

Chganges since v2:

- Use locking instead of atomic_t as suggested by Greg

Changes since v1:

- Separated out line discipline patches, n_tty -EAGAIN change I still
  need to retest

- Changed prep_tx() to more generic wakeup() as also flow control needs it

- Changed over to using wakeup() with device driver runtime PM instead
  of write_room()

- Added runtime_suspended flag for drivers and generic serial layer PM
  to use


Tony Lindgren (4):
  serial: core: Add wakeup() and start_pending_tx() for power management
  serial: 8250: Implement wakeup for TX and use it for 8250_omap
  serial: 8250_omap: Require a valid wakeirq for deeper idle states
  serial: 8250_omap: Drop the use of pm_runtime_irq_safe()

 Documentation/driver-api/serial/driver.rst |  9 +++
 drivers/tty/serial/8250/8250_omap.c        | 44 ++++++++++----
 drivers/tty/serial/8250/8250_port.c        | 39 ++++++++++++-
 drivers/tty/serial/serial_core.c           | 68 +++++++++++++++++++++-
 include/linux/serial_core.h                |  3 +
 5 files changed, 149 insertions(+), 14 deletions(-)

-- 
2.33.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-21  6:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 11:26 [PATCHv3 0/4] Get rid of pm_runtime_irq_safe() for 8250_omap Tony Lindgren
2021-10-15 11:26 ` [PATCH 1/4] serial: core: Add wakeup() and start_pending_tx() for power management Tony Lindgren
2021-10-18  7:09   ` Johan Hovold
2021-10-21  6:32     ` Tony Lindgren
2021-10-15 11:26 ` [PATCH 2/4] serial: 8250: Implement wakeup for TX and use it for 8250_omap Tony Lindgren
2021-10-15 11:26 ` [PATCH 3/4] serial: 8250_omap: Require a valid wakeirq for deeper idle states Tony Lindgren
2021-10-15 11:26 ` [PATCH 4/4] serial: 8250_omap: Drop the use of pm_runtime_irq_safe() Tony Lindgren
2021-10-18  7:11 ` [PATCHv3 0/4] Get rid of pm_runtime_irq_safe() for 8250_omap Johan Hovold

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).