From patchwork Wed May 27 10:06:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 26419 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 n4RA8vkc022527 for ; Wed, 27 May 2009 10:09:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758727AbZE0KJu (ORCPT ); Wed, 27 May 2009 06:09:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758598AbZE0KJu (ORCPT ); Wed, 27 May 2009 06:09:50 -0400 Received: from rv-out-0506.google.com ([209.85.198.225]:28594 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758727AbZE0KJu (ORCPT ); Wed, 27 May 2009 06:09:50 -0400 Received: by rv-out-0506.google.com with SMTP id f9so1424878rvb.1 for ; Wed, 27 May 2009 03:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=zir3ajMnyTlydO09SO37i1gRo1dKbh6MyFHesKkuGH0=; b=UBWvqjIq+AjD7hidhngdim6LluJ+Q8MXIAnnDjcdb/ChTdHNDgJlJ/W6dbvkgH6kV4 PXNO/0Z7TXAzfQbDDipi7ObVGa8jaJJwV//ZEEu6tt5acJzaCVYXWjbEA81NG9cj9WVA KpgGCFLD3ZIwFlfTOw4FyMKNbT1yQKDIaY5Yk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=syMXiQQH6an2zSCrN88t90supDb9rnKyXc5obz7MxdUW15U5k51F1QagtUzJmVfec5 T1rU3/tsoVRKIt2gf2qsClTMPqcufOB8t9fM9jmv5ZBe+1yOjLD7lJpm5Rq1QPU4jxc3 dgZT3P4kQT2JB7j6p/+AyRPr0ZtJPIcJ1uWMc= Received: by 10.141.75.12 with SMTP id c12mr3756003rvl.276.1243418992192; Wed, 27 May 2009 03:09:52 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id b39sm2904540rvf.11.2009.05.27.03.09.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 May 2009 03:09:51 -0700 (PDT) From: Magnus Damm To: linux-pm@lists.linux-foundation.org Cc: paul@pwsan.com, linux-sh@vger.kernel.org, khilman@deeprootsystems.com, gregkh@suse.de, rjw@sisk.pl, lethal@linux-sh.org, stern@rowland.harvard.edu, Magnus Damm Date: Wed, 27 May 2009 19:06:42 +0900 Message-Id: <20090527100642.29671.52231.sendpatchset@rx1.opensource.se> In-Reply-To: <20090527100625.29671.43166.sendpatchset@rx1.opensource.se> References: <20090527100625.29671.43166.sendpatchset@rx1.opensource.se> Subject: [PATCH 02/04] Driver Core: Add idle and wakeup functions Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Add platform_device_idle() and platform_device_wakeup() and allow architectures to implement their own versions of these if CONFIG_HAVE_PLATFORM_IDLE_WAKEUP is set. Signed-off-by: Magnus Damm --- Yes, this needs documentation. See [00/04] for now. arch/Kconfig | 3 +++ include/linux/platform_device.h | 8 ++++++++ 2 files changed, 11 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0002/arch/Kconfig +++ work/arch/Kconfig 2009-05-26 12:31:06.000000000 +0900 @@ -115,3 +115,6 @@ config HAVE_DEFAULT_NO_SPIN_MUTEXES config HAVE_PLATFORM_DEVICE_ARCHDATA bool + +config HAVE_PLATFORM_DEVICE_IDLE_WAKEUP + bool --- 0002/include/linux/platform_device.h +++ work/include/linux/platform_device.h 2009-05-26 12:32:40.000000000 +0900 @@ -57,6 +57,14 @@ extern int platform_device_add(struct pl extern void platform_device_del(struct platform_device *pdev); extern void platform_device_put(struct platform_device *pdev); +#ifdef CONFIG_HAVE_PLATFORM_DEVICE_IDLE_WAKEUP +void platform_device_idle(struct platform_device *pdev); +void platform_device_wakeup(struct platform_device *pdev); +#else +static inline void platform_device_idle(struct platform_device *pdev) {} +static inline void platform_device_wakeup(struct platform_device *pdev) {} +#endif + struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *);