From patchwork Mon Jul 16 21:23:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1202441 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B96D2E0038 for ; Mon, 16 Jul 2012 21:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754211Ab2GPVbk (ORCPT ); Mon, 16 Jul 2012 17:31:40 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:43060 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754113Ab2GPV2j (ORCPT ); Mon, 16 Jul 2012 17:28:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id EDD201D821D; Mon, 16 Jul 2012 23:25:33 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04355-03; Mon, 16 Jul 2012 23:24:49 +0200 (CEST) Received: from ferrari.rjw.lan (62-121-64-87.home.aster.pl [62.121.64.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id DD05D1D825B; Mon, 16 Jul 2012 23:24:28 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM list Subject: [RFC][PATCH 6/14] RM: shmobile: Add routine for automatic PM domains initialization Date: Mon, 16 Jul 2012 23:23:15 +0200 User-Agent: KMail/1.13.6 (Linux/3.5.0-rc5+; KDE/4.6.0; x86_64; ; ) Cc: Mark Brown , LKML , Matthew Garrett , Magnus Damm , Arnd Bergmann , Grant Likely , "Linux-sh list" References: <201207032302.17805.rjw@sisk.pl> <201207052217.48086.rjw@sisk.pl> <201207162315.49073.rjw@sisk.pl> In-Reply-To: <201207162315.49073.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201207162323.16114.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Rafael J. Wysocki Add a new routine, rmobile_init_domains(), allowing the caller to initialize all generic PM objects stored in a table in one operation. Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/include/mach/pm-rmobile.h | 2 ++ arch/arm/mach-shmobile/pm-rmobile.c | 8 ++++++++ 2 files changed, 10 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 Index: linux/arch/arm/mach-shmobile/pm-rmobile.c =================================================================== --- linux.orig/arch/arm/mach-shmobile/pm-rmobile.c +++ linux/arch/arm/mach-shmobile/pm-rmobile.c @@ -149,6 +149,14 @@ void rmobile_init_pm_domain(struct rmobi __rmobile_pd_power_up(rmobile_pd, false); } +void rmobile_init_domains(struct rmobile_pm_domain domains[], int num) +{ + int j; + + for (j = 0; j < num; j++) + rmobile_init_pm_domain(&domains[j]); +} + void rmobile_add_device_to_domain(const char *domain_name, struct platform_device *pdev) { Index: linux/arch/arm/mach-shmobile/include/mach/pm-rmobile.h =================================================================== --- linux.orig/arch/arm/mach-shmobile/include/mach/pm-rmobile.h +++ linux/arch/arm/mach-shmobile/include/mach/pm-rmobile.h @@ -31,10 +31,12 @@ struct rmobile_pm_domain *to_rmobile_pd( #ifdef CONFIG_PM extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd); +extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); extern void rmobile_add_device_to_domain(const char *domain_name, struct platform_device *pdev); #else #define rmobile_init_pm_domain(pd) do { } while (0) +#define rmobile_init_domains(domains, num) do { } while (0) #define rmobile_add_device_to_domain(name, pdev) do { } while (0) #endif /* CONFIG_PM */