From patchwork Wed May 14 08:03:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 30151 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4F23720446 for ; Wed, 14 May 2014 08:04:30 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rp18sf7449863iec.5 for ; Wed, 14 May 2014 01:04:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=oBklebk1EbxXv5m0bIOC3KaaUAzU6EN8NP8vKQquP5I=; b=mGXlrTIL0hTFTIJ8ggdIodCJBNph3PYgBQwTxpTXjiuJD68/RI58amfkrj+wXmtMy1 fFcRFzoLKwaRLNEARK7KXbMtwVLx8CY+1IbqZB3/S/RG1oPq0Zvg2++JWfDQdcyCQ8zC ZwWGQE9eOyGJWJ4dXe3JRhC+mryQKTGaSHRo61bEzQ3F+iGRtMzOpyHIOu8+ocezJhuy 0Aaw9NXFbnV4qCgsoVxH6E1KGEHFwZrqWhQoDx43p1u56wvfIGzqRWuYgDM7RmSf1Xdw LtnC32AVvjxGKJn4P+7W9MrqMPcvqB4REFG6o7j1IJ1EknRgO6gmPUVDzbc9hA3vIIXA 5dhQ== X-Gm-Message-State: ALoCoQmUrQT4ZxWi1yUdb71C48AV2gNOyBvnAt0YG23LI700Lj7LsL/lcE/eRh6wSu+BJVuzFKTV X-Received: by 10.182.118.194 with SMTP id ko2mr1040107obb.32.1400054669802; Wed, 14 May 2014 01:04:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.44 with SMTP id a41ls2225482qge.72.gmail; Wed, 14 May 2014 01:04:29 -0700 (PDT) X-Received: by 10.52.27.209 with SMTP id v17mr1529086vdg.23.1400054669720; Wed, 14 May 2014 01:04:29 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id up2si194780vec.158.2014.05.14.01.04.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 01:04:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id hq16so1955526vcb.23 for ; Wed, 14 May 2014 01:04:29 -0700 (PDT) X-Received: by 10.58.48.201 with SMTP id o9mr1818496ven.5.1400054669639; Wed, 14 May 2014 01:04:29 -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 ib8csp219121vcb; Wed, 14 May 2014 01:04:29 -0700 (PDT) X-Received: by 10.66.140.6 with SMTP id rc6mr2446145pab.87.1400054668798; Wed, 14 May 2014 01:04:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kg4si1110293pad.239.2014.05.14.01.04.28; Wed, 14 May 2014 01:04:28 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbaENIE0 (ORCPT + 12 others); Wed, 14 May 2014 04:04:26 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:61427 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752981AbaENIET (ORCPT ); Wed, 14 May 2014 04:04:19 -0400 Received: by mail-pb0-f52.google.com with SMTP id rr13so1378759pbb.25 for ; Wed, 14 May 2014 01:04:19 -0700 (PDT) X-Received: by 10.66.163.2 with SMTP id ye2mr2532019pab.110.1400054659090; Wed, 14 May 2014 01:04:19 -0700 (PDT) Received: from localhost.localdomain ([14.140.216.146]) by mx.google.com with ESMTPSA id as12sm4807422pac.43.2014.05.14.01.04.14 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 01:04:18 -0700 (PDT) From: Chander Kashyap To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: daniel.lezcano@linaro.org, lorenzo.pieralisi@arm.com, rjw@rjwysocki.net, kgene.kim@samsung.com, Chander Kashyap , Chander Kashyap Subject: [PATCH v5 1/6] driver: cpuidle-big-little: add of_device_id structure Date: Wed, 14 May 2014 13:33:52 +0530 Message-Id: <1400054637-21505-2-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400054637-21505-1-git-send-email-chander.kashyap@linaro.org> References: <1400054637-21505-1-git-send-email-chander.kashyap@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.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.178 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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