lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] serial: core: Add new prep_tx for power management
On Tue, Sep 21, 2021 at 01:33:43PM +0300, Tony Lindgren wrote:
> If the serial driver implements PM runtime with autosuspend, the port may
> be powered off for TX. To wake up the port, let's add new prep_tx() call
> for serial drivers to implement as needed. We call it from serial
> write_room() and write() functions. If the serial port is not enabled,
> we just return 0.

This isn't right. If there's room in the driver buffer, there's no
reason to not accept those characters.

It's the drivers responsibility to resume writing when write() is
called and that me need to be done in a runtime resume callback in case
the device is suspended.

No need to be patching line disciplines for this.

Johan

\
 
 \ /
  Last update: 2021-09-23 14:47    [W:0.088 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site