From patchwork Mon May 5 08:27:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 29612 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 58D48202E6 for ; Mon, 5 May 2014 08:27:56 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf41711667iec.10 for ; Mon, 05 May 2014 01:27:55 -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=hr0b5u/DBKSsUZSdSx7ieaFMnRdHfF8BBnU9c2+HHQXd0tEKJc/CytbHG2a7jKEyp8 oroeJYjWJtdZ8ThiQUuvpSGv/c6eXTjPyIJhMqjSuMSg6bUbZmARfMiUdWPxKoxb219l MZxWm38zE+vGcR2UnQ9XnWIL7FjC3OeviIzMrLX0LwrKPQkSOAvRdsBOeo6AuBf2691r Wj1waDQtRXW4yim5HiD4rkoK1eUnFOYb86hFsT2niwnqvGSLIKpnXFf+ZXWddnmtxl1d YJi8O4VGx2eUzi/YYaJjFVl7jmWpXiQOJoCk5N/nF/k4l4cdxT3Ct1BUStVj8b4B/Clu o2kw== X-Gm-Message-State: ALoCoQmjrWs7HVJ0TO0B1Uv2xrmsq5g8pHDhYxmv7Ww3yDYyvI8cB6nYqzMpWgxH0+vMkYXM7uHB X-Received: by 10.50.178.200 with SMTP id da8mr9624250igc.6.1399278475688; Mon, 05 May 2014 01:27:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.80.107 with SMTP id b98ls2358861qgd.64.gmail; Mon, 05 May 2014 01:27:55 -0700 (PDT) X-Received: by 10.58.202.133 with SMTP id ki5mr26648247vec.19.1399278475577; Mon, 05 May 2014 01:27:55 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id j5si1400168veb.129.2014.05.05.01.27.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 May 2014 01:27:55 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id la4so1181674vcb.41 for ; Mon, 05 May 2014 01:27:55 -0700 (PDT) X-Received: by 10.58.31.136 with SMTP id a8mr28007891vei.20.1399278475505; Mon, 05 May 2014 01:27:55 -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 ib8csp122352vcb; Mon, 5 May 2014 01:27:55 -0700 (PDT) X-Received: by 10.66.162.74 with SMTP id xy10mr69383498pab.4.1399278474725; Mon, 05 May 2014 01:27:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yb4si7674181pab.349.2014.05.05.01.27.54; Mon, 05 May 2014 01:27:54 -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 S1754968AbaEEI1o (ORCPT + 12 others); Mon, 5 May 2014 04:27:44 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:43082 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754997AbaEEI1n (ORCPT ); Mon, 5 May 2014 04:27:43 -0400 Received: by mail-ig0-f179.google.com with SMTP id hn18so4441085igb.0 for ; Mon, 05 May 2014 01:27:42 -0700 (PDT) X-Received: by 10.42.120.15 with SMTP id d15mr31501448icr.35.1399278462842; Mon, 05 May 2014 01:27:42 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id d10sm25050399igc.8.2014.05.05.01.27.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 May 2014 01:27:42 -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: lorenzo.pieralisi@arm.com, daniel.lezcano@linaro.org, rjw@rjwysocki.net, kgene.kim@samsung.com, Chander Kashyap , Chander Kashyap Subject: [Patch v3 1/5] driver: cpuidle-big-little: add of_device_id structure Date: Mon, 5 May 2014 13:57:20 +0530 Message-Id: <1399278444-8312-2-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1399278444-8312-1-git-send-email-chander.kashyap@linaro.org> References: <1398245154-18771-1-git-send-email-chander.kashyap@linaro.org> <1399278444-8312-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=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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