From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCHv3] driver: serial: prevent UART console idle on suspend while using "no_console_suspend" Date: Fri, 05 Apr 2013 10:40:29 -0700 Message-ID: <87mwtclvua.fsf@linaro.org> References: <1365167733-28083-1-git-send-email-sourav.poddar@ti.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mail-pa0-f48.google.com ([209.85.220.48]:35680 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162214Ab3DERkd (ORCPT ); Fri, 5 Apr 2013 13:40:33 -0400 Received: by mail-pa0-f48.google.com with SMTP id lj1so2152690pab.21 for ; Fri, 05 Apr 2013 10:40:32 -0700 (PDT) In-Reply-To: <1365167733-28083-1-git-send-email-sourav.poddar@ti.com> (Sourav Poddar's message of "Fri, 5 Apr 2013 18:45:33 +0530") Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Sourav Poddar Cc: gregkh@linuxfoundation.org, tony@atomide.com, rmk+kernel@arm.linux.org.uk, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Santosh Shilimkar , Felipe Balbi , Rajendra nayak Sourav Poddar writes: > With dt boot, uart wakeup after suspend is non functional while using > "no_console_suspend" in the bootargs. With "no_console_suspend" used, we > should prevent the runtime suspend of the uart port which is getting used > as an console. > > Cc: Santosh Shilimkar > Cc: Felipe Balbi > Cc: Rajendra nayak > Tested on omap5430evm, omap4430sdp. > > Signed-off-by: Sourav Poddar Rather than make these special checks inside the driver's runtime PM callbacks, you should just disable runtime PM (pm_runtime_disable()) Then, this should be broken into 2 patches. 1) serial core: add the '->is_console' flag. (nit on naming: don't call it port_is_console, since the struct is already a uart_port) 2) In the OMAP UART driver's ->prepare callback, check the is_console flag and pm_runtime_disable() accordingly (then pm_runtime_enable() in the drivers's ->complete callback. Kevin