From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755782AbcARP7F (ORCPT ); Mon, 18 Jan 2016 10:59:05 -0500 Received: from foss.arm.com ([217.140.101.70]:35356 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755757AbcARP7C (ORCPT ); Mon, 18 Jan 2016 10:59:02 -0500 Subject: Re: [PATCH] driver-core: platform: automatically mark wakeup devices To: "Rafael J. Wysocki" References: <20160118021138.GA20498@dtor-ws> <2182115.GafOXid1Dx@vostro.rjw.lan> <1984537.Ed4NObzuHH@vostro.rjw.lan> Cc: Sudeep Holla , Dmitry Torokhov , Greg Kroah-Hartman , Rob Herring , Grant Likely , Linus Walleij , Thierry Reding , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , open list , "Rafael J. Wysocki" From: Sudeep Holla Organization: ARM Message-ID: <569D0BC2.8050602@arm.com> Date: Mon, 18 Jan 2016 15:58:58 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1984537.Ed4NObzuHH@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/01/16 15:41, Rafael J. Wysocki wrote: > On Monday, January 18, 2016 03:23:18 PM Sudeep Holla wrote: >> On Mon, Jan 18, 2016 at 2:47 PM, Rafael J. Wysocki wrote: >>> On Sunday, January 17, 2016 06:11:38 PM Dmitry Torokhov wrote: >>>> When probing platform drivers let's check if corresponding devices have >>>> "wakeup-source" property defined (either in device tree, ACPI, or static >>>> platform properties) and automatically enable such devices as wakeup >>>> sources for the system. This will help us standardize on the name for this >>>> property and reduce amount of boilerplate code in the drivers. >>> >>> ACPI has other ways of telling the OS that the device is wakeup-capable, >>> but I guess the property in question can be used too (as long as it is >>> consistent with the other methods). >>> >> >> Just curious to know what you mean when you say this property can also >> be used with ACPI. Do you mean we could use "wakeup-source" DSD ? > > Yes. > >> If so, won't that go against rule for DSD (i.e we *should not* bypass the >> existing mechanisms defined by the ACPI, e.g. _SxW in this case) > > Not necessarily. > > What if the device doesn't use ACPI PM and still can wake up the system? > May be I don't understand the exact configuration you are referring, but if you don't use ACPI PM, how will that system enter sleep states ? IIUC you are referring suspend-to-idle case only here which doesn't require any ACPI _Sx methods, which make sense. But still I don't see a strong reason to provide an alternate method to specify the same information. Firmware responsible for ACPI tables have to specify this DSD in question, instead it can use the existing mechanism in ACPI. Let me know if I am missing some information about the systems you are referring ? -- Regards, Sudeep