Re: [PATCH v2] serial: 8250: omap: Provide ability to enable/disable UART as wakeup source

2018-04-02 Thread Andy Shevchenko
On Mon, Apr 2, 2018 at 5:01 PM, Andy Shevchenko wrote: > On Mon, Apr 2, 2018 at 3:20 PM, Vignesh R wrote: >> + if (!device_may_wakeup(dev)) >> + priv->wer = 0; > > Can it be > > priv->wer = device_may_wakeup(dev); > > ? Answering to myself, missed that this value is used as

Re: [PATCH v2] serial: 8250: omap: Provide ability to enable/disable UART as wakeup source

2018-04-02 Thread Andy Shevchenko
On Mon, Apr 2, 2018 at 3:20 PM, Vignesh R wrote: > + pm_runtime_get_sync(dev); > + if (!device_may_wakeup(dev)) > + priv->wer = 0; Can it be priv->wer = device_may_wakeup(dev); ? > + serial_out(up, UART_OMAP_WER, priv->wer); > + pm_runtime_mark_last_busy

[PATCH v2] serial: 8250: omap: Provide ability to enable/disable UART as wakeup source

2018-04-02 Thread Vignesh R
Enable/Clear module level UART wakeup in UART_OMAP_WER register based on return value of device_may_wakeup() in .suspend(). This allows userspace to use sysfs to control the ability of UART to wakeup the system from deep sleep state. Register is restored back in .startup() call that happens as part