Re: [PATCH 2/3] Provide console_suspend() and console_resume()

Russell King
2004-06-30T19:30:54Z

On Wed, Jun 30, 2004 at 02:37:29PM +0200, Pavel Machek wrote:
> Hi!
>
> > Add console_suspend() and console_resume() methods so the serial drivers
> > can disable console output before suspending a port, and re-enable output
> > afterwards.
>
> Could it be called console_stop()/console_start()? suspend/resume
> sounds like power managment, and it is unrelated....

It is power management related! However, we decided that console_start/
console_stop was a better name for it.

That said, it is _NOT_ intended for general use since there is NO
counting of how many times console_stop() is called. It is merely
used by the serial driver to prevent further serial console output
before shutting the console port down for power management.

This avoids the problem where, on resume, we haven't even enabled
the UART - if we were to attempt to write to the UART in this
circumstance, it would not be setup in any way - no baud rate,
and in fact, since it is disabled, we'd spin for ever waiting for
the port to say its completed transmission of the first byte.

So yes, it most definitely _is_ power management related.