From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hurley Subject: Re: [PATCH 3/4] PNP: Allow device to override ACPI device sleep Date: Wed, 05 Nov 2014 17:14:17 -0500 Message-ID: <545AA139.9040207@hurleysoftware.com> References: <1415212854-16944-1-git-send-email-peter@hurleysoftware.com> <1415212854-16944-4-git-send-email-peter@hurleysoftware.com> <4057911.0dclCWmemA@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout32.mail01.mtsvc.net ([216.70.64.70]:54543 "EHLO n23.mail01.mtsvc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751110AbaKEWOV (ORCPT ); Wed, 5 Nov 2014 17:14:21 -0500 In-Reply-To: <4057911.0dclCWmemA@vostro.rjw.lan> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Jiri Slaby On 11/05/2014 05:28 PM, Rafael J. Wysocki wrote: > On Wednesday, November 05, 2014 01:40:53 PM Peter Hurley wrote: >> If the serial console is an ACPI PNP device, the PNP bus attempts to >> power-down the device, even though the no_console_suspend command line >> parameter is specified (eg., debugging suspend/resume). >> >> Add PNP_SUSPEND capability which is on by default, but when cleared, >> prevents pnpacpi_suspend() (which is the ACPI PNP protocol ->suspend() >> method). >> >> Signed-off-by: Peter Hurley > > While I'm not disagreeing with this entirely, I have a concern. > > There are two types of suspend in Linux these days, runtime suspend and > system suspend. What this is about is "device suspend during system > suspend" only, so the flag name is somewhat confusing. Yeah, I see your point. I wouldn't want people thinking this had anything to do with runtime pm. > Also the flag is only going to be used for consoles, so why don't you > introduce a PNP_CONSOLE flag and then define pnp_can_suspend() as > > static inline pnp_can_suspend(struct pnp_dev *pnp_dev) > { > return pnp_dev->protocol->suspend && > (!(pnp_dev->capabilities & PNP_CONSOLE) || console_suspend_enabled); > } I can do that. Regards, Peter Hurley