From patchwork Fri May 16 08:03:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 30306 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4042820C81 for ; Fri, 16 May 2014 08:07:02 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 29sf17378965yhl.6 for ; Fri, 16 May 2014 01:07:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=nEoCycKmifp6HNmZJx6X12gJgLi//fH85SrLAsDJf1Q=; b=SVF6nU4anIz85il+p9D0V6nbZ+tCnRSNCA2Sl6PSQZZ/Rweycx/9+XicG8K575aSun 3U5PHs92VBLMKcsj6+/95xZkj5hGwSSlS+Yb7TLL8JjtF0pcu63sdyNpKNoCZlguTODs bryOyedFf6HBSZ8KwleTmY80Ldogwzu+KPQaO2zE/rn/IWb+iDe61FL3wvIMR1XVExVa ji/wDpQsp2JQDeOdlRvUkVzsQzWA6e++we5cpZNtSEXCVL2yxddyO/6JnD5v9LheJPkO jwyiWuhG0FcyFIMtZmEmFvxXO1//+4Ievpzj62oq9vEjgpuq2or9nWtYY30yUqBFxDn0 KQsg== X-Gm-Message-State: ALoCoQlN7dUp9Zqv3PfCuHEKgqX+pygppN9+r6RlAb1eNTjEey2CuKCyblBzAX1IaiYGMUmW+QyB X-Received: by 10.58.25.99 with SMTP id b3mr8125745veg.28.1400227622080; Fri, 16 May 2014 01:07:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.234 with SMTP id a97ls606557qgf.51.gmail; Fri, 16 May 2014 01:07:02 -0700 (PDT) X-Received: by 10.58.133.38 with SMTP id oz6mr12516veb.46.1400227622019; Fri, 16 May 2014 01:07:02 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id lt7si1407638vcb.158.2014.05.16.01.07.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 May 2014 01:07:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id il7so5787870vcb.18 for ; Fri, 16 May 2014 01:07:01 -0700 (PDT) X-Received: by 10.52.113.1 with SMTP id iu1mr5115678vdb.35.1400227621904; Fri, 16 May 2014 01:07:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp32203vcb; Fri, 16 May 2014 01:07:01 -0700 (PDT) X-Received: by 10.224.167.209 with SMTP id r17mr20664221qay.1.1400227619518; Fri, 16 May 2014 01:06:59 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id x7si3774599qaj.117.2014.05.16.01.06.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 May 2014 01:06:59 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WlD8P-0000wN-Up; Fri, 16 May 2014 08:04:53 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WlD8H-0000l3-6D for linux-arm-kernel@lists.infradead.org; Fri, 16 May 2014 08:04:45 +0000 Received: by mail-pa0-f54.google.com with SMTP id bj1so2228793pad.41 for ; Fri, 16 May 2014 01:04:24 -0700 (PDT) X-Received: by 10.68.241.68 with SMTP id wg4mr18849608pbc.66.1400227464116; Fri, 16 May 2014 01:04:24 -0700 (PDT) Received: from localhost.localdomain ([14.140.216.146]) by mx.google.com with ESMTPSA id gu1sm13108466pbd.0.2014.05.16.01.04.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 May 2014 01:04:23 -0700 (PDT) From: Chander Kashyap To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v6 1/6] driver: cpuidle-big-little: add of_device_id structure Date: Fri, 16 May 2014 13:33:53 +0530 Message-Id: <1400227438-27155-2-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400227438-27155-1-git-send-email-chander.kashyap@linaro.org> References: <1400227438-27155-1-git-send-email-chander.kashyap@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140516_010445_285529_2A03E8A6 X-CRM114-Status: GOOD ( 14.17 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.54 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Chander Kashyap , lorenzo.pieralisi@arm.com, daniel.lezcano@linaro.org, rjw@rjwysocki.net, tomasz.figa@gmail.com, Chander Kashyap , kgene.kim@samsung.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: chander.kashyap@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This driver will be used by many big.Little Soc's. As of now it does string matching of hardcoded compatible string to init the driver. This comparison list will keep on growing with addition of new SoC's. Hence add of_device_id structure to collect the compatible strings of SoC's using this driver. Signed-off-by: Chander Kashyap Signed-off-by: Chander Kashyap Acked-by: Daniel Lezcano --- drivers/cpuidle/cpuidle-big_little.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c index b45fc62..4cd02bd 100644 --- a/drivers/cpuidle/cpuidle-big_little.c +++ b/drivers/cpuidle/cpuidle-big_little.c @@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id) return 0; } +static const struct of_device_id compatible_machine_match[] = { + { .compatible = "arm,vexpress,v2p-ca15_a7" }, + {}, +}; + static int __init bl_idle_init(void) { int ret; + struct device_node *root = of_find_node_by_path("/"); + + if (!root) + return -ENODEV; /* * Initialize the driver just for a compliant set of machines */ - if (!of_machine_is_compatible("arm,vexpress,v2p-ca15_a7")) + if (!of_match_node(compatible_machine_match, root)) return -ENODEV; /* * For now the differentiation between little and big cores