From patchwork Wed Aug 19 07:24:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 42529 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7J7OFtO019226 for ; Wed, 19 Aug 2009 07:24:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbZHSHYP (ORCPT ); Wed, 19 Aug 2009 03:24:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751423AbZHSHYP (ORCPT ); Wed, 19 Aug 2009 03:24:15 -0400 Received: from mga09.intel.com ([134.134.136.24]:21003 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751245AbZHSHYO (ORCPT ); Wed, 19 Aug 2009 03:24:14 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 19 Aug 2009 00:10:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.43,407,1246863600"; d="scan'208";a="542758304" Received: from sli10-conroe.sh.intel.com (HELO [10.239.13.175]) ([10.239.13.175]) by orsmga001.jf.intel.com with ESMTP; 19 Aug 2009 00:23:42 -0700 Subject: [PATCH 2/5] introduce default operation for wakeup event From: Shaohua Li To: linux acpi , linux-pm Cc: "Rafael J. Wysocki" , Alan Stern , mjg59 Date: Wed, 19 Aug 2009 15:24:14 +0800 Message-Id: <1250666654.23178.117.camel@sli10-desk.sh.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The default action to handle wakeup event. Currently just prints something. Later we should add real operations like calling pm_runtime_resume(). The routine will be called in task context. --- drivers/base/power/main.c | 6 ++++++ include/linux/pm.h | 2 ++ 2 files changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/drivers/base/power/main.c =================================================================== --- linux.orig/drivers/base/power/main.c 2009-08-19 13:44:03.000000000 +0800 +++ linux/drivers/base/power/main.c 2009-08-19 13:48:27.000000000 +0800 @@ -825,3 +825,9 @@ void __suspend_report_result(const char printk(KERN_ERR "%s(): %pF returns %d\n", function, fn, ret); } EXPORT_SYMBOL_GPL(__suspend_report_result); + +void device_receive_wakeup_event(struct device *dev) +{ + pr_debug("Device %s invokes wakeup event\n", dev_name(dev)); +} +EXPORT_SYMBOL(device_receive_wakeup_event); Index: linux/include/linux/pm.h =================================================================== --- linux.orig/include/linux/pm.h 2009-08-19 13:44:03.000000000 +0800 +++ linux/include/linux/pm.h 2009-08-19 13:48:27.000000000 +0800 @@ -437,6 +437,8 @@ struct dev_pm_info { /* Necessary, because several drivers use PM_EVENT_PRETHAW */ #define PM_EVENT_PRETHAW PM_EVENT_QUIESCE +void device_receive_wakeup_event(struct device *dev); + /* * One transition is triggered by resume(), after a suspend() call; the * message is implicit: