Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5555174yba; Mon, 13 May 2019 12:56:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0sWamak125p4XDQtuaAVhWmPpptoR3BDoXxlBsRpnKDRT282THEChZaIZuOmqQ5ndMcU2 X-Received: by 2002:a62:1b85:: with SMTP id b127mr7891623pfb.165.1557777403179; Mon, 13 May 2019 12:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557777403; cv=none; d=google.com; s=arc-20160816; b=ZIRutw4H5w2Yan1C/B50NGfDLqKrzxEBcXJ++zTzqQ2qZY57TkB6C73W4N/7hvpTpu jODFMQyDK6D+8miMwqpu0aQ2Iq7YcbjKhInY1gUXo/UQSCnUr9ix69hwYCkIXs3mjWKU 2u2w7hlRCu7bsDCSfsiOy51YaRJvUKZVI3ZEK6GwbV8dR7zk+GUiQsHJLGM3kTiK+kOZ t7/vR56jtGKlia0zjCw+f+0cM9qQdgk89a79afKCqZmRHabEkdWCbjUBIe98h2L3b1KP GpBY2c0gd4YjIxkY3/7etkekuyVeF3wPnbqblf93o16uGBpXNsk1JHs4WKaZv70fD1NY nNxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=F5AEltUKfed5w7dHNisHSX8S1wBzU63rf2dZ2cHwfSs=; b=WluGo8sUpJ4nCQdFdwrNJgegFJFTdoE7dRhD7s6QMh0kcO7Kq1y8bbHGDvKslV5IRf +b8Pb3Pkj9hIjx0sZ/ClC5ReTDbtxJoscESQOTsEz3eW6eW3+k/l9fhN2KEZfyeLzIuy aImI5WOEB22KQ+l/2qh5l0sU11UhLCarzNMmTxGOB3Ha7zIhaR/j0hVvsoj2Ewmq1O3z Qb/qskAN1euDss1ZtWac2OCYu15NysklasYGPCWLKD49pe6qdfpkTUH5PlDDwsp2hg0c wrp7VltsTyUHFwy23jGJ+ZeMgKFuGgoAMaQOanan7/FNG2l5g3VDhJL3r6/e3Oznjtpl tkcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ihwtaKGH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci5si13967854plb.433.2019.05.13.12.56.27; Mon, 13 May 2019 12:56:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ihwtaKGH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729581AbfEMTXQ (ORCPT + 99 others); Mon, 13 May 2019 15:23:16 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45538 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729507AbfEMTXM (ORCPT ); Mon, 13 May 2019 15:23:12 -0400 Received: by mail-lj1-f196.google.com with SMTP id r76so12042380lja.12 for ; Mon, 13 May 2019 12:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F5AEltUKfed5w7dHNisHSX8S1wBzU63rf2dZ2cHwfSs=; b=ihwtaKGHm5HWQDkvQkty6/m7be/aDE2Ue2EF8h2aUL7J5q3dbOjBQl/7riCd7391Bk 6mt4yavZncehbr1dqBkKzd5+XE6F5UVYInUI/aMbhArbPszaqyttf3MVOOEailuYdP3R fucpydZkU9Xe7taVXR0KfQZCmk+WPepu9Fz5czOMEkZzxq0cyv/O9xzdwPbelTwhxiAt AgLFcBQz4OuHsSIHPRYM79Mx2eXRaijBK738WDXPRnaM8wcxzwaXGNHAtjVqh3N6NVfn PALPweQK2a7Hw+qtF1599CtdwmhaZJP3Loxm6jMlG87c2/LPW1b4sxzN22fBdrGhOVkv xgGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F5AEltUKfed5w7dHNisHSX8S1wBzU63rf2dZ2cHwfSs=; b=EEj0eYX2xG8jtxfK6gt62U5VgpDqMs2DNcVLVlK6af+vVDbYj8pGENGnn5ZcASNWC0 xo/+bJbveSYjrObQP+Qs9U8L0BRFd+0YNl6840dVHgTM0hiFJH9ONkc/iE37XWLwS1fS qO05CNKq6bFgZMz9/PiY/6259ynpasIGyIGchRg1FDchrtwXx5HYnr2Gk52Yah7B16lm wTgIvFTpCbiFiR+PcbtA1q7ndGGoQs8a5wFx6tFMzVoolA9ebmES41rm62TAazHVnnds BfJ82jvVj+ovkLv56JJyWub8iw0V4U4kmDZ8kxGBXkC3TMm6luhMzpk1WW6XK7whlc7y BFVQ== X-Gm-Message-State: APjAAAVBtnS7CQ6r0O90/NA0dnktRWeMtnGtEQG5dJEz2V5pRRnN+EJG cuHJ0UwSMWpTqGOd6WzXCH2cQg== X-Received: by 2002:a2e:c41:: with SMTP id o1mr8693546ljd.23.1557775391156; Mon, 13 May 2019 12:23:11 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id q21sm3449365lfa.84.2019.05.13.12.23.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 12:23:10 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , linux-arm-kernel@lists.infradead.org Cc: "Rafael J . Wysocki" , Daniel Lezcano , "Raju P . L . S . S . S . N" , Amit Kucheria , Bjorn Andersson , Stephen Boyd , Niklas Cassel , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Souvik Chakravarty , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer , Ulf Hansson Subject: [PATCH 03/18] cpuidle: dt: Support hierarchical CPU idle states Date: Mon, 13 May 2019 21:22:45 +0200 Message-Id: <20190513192300.653-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190513192300.653-1-ulf.hansson@linaro.org> References: <20190513192300.653-1-ulf.hansson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lina Iyer Currently CPU's idle states are represented in a flattened model, via the "cpu-idle-states" binding from within the CPU's device nodes. Support the hierarchical layout during parsing and validating of the CPU's idle states. This is simply done by calling the new OF helper, of_get_cpu_state_node(). Suggested-by: Sudeep Holla Signed-off-by: Lina Iyer Reviewed-by: Daniel Lezcano Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson --- Changes: - None. --- drivers/cpuidle/dt_idle_states.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c index add9569636b5..97ad25399ca8 100644 --- a/drivers/cpuidle/dt_idle_states.c +++ b/drivers/cpuidle/dt_idle_states.c @@ -114,8 +114,7 @@ static bool idle_state_valid(struct device_node *state_node, unsigned int idx, for (cpu = cpumask_next(cpumask_first(cpumask), cpumask); cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpumask)) { cpu_node = of_cpu_device_node_get(cpu); - curr_state_node = of_parse_phandle(cpu_node, "cpu-idle-states", - idx); + curr_state_node = of_get_cpu_state_node(cpu_node, idx); if (state_node != curr_state_node) valid = false; @@ -173,7 +172,7 @@ int dt_init_idle_driver(struct cpuidle_driver *drv, cpu_node = of_cpu_device_node_get(cpumask_first(cpumask)); for (i = 0; ; i++) { - state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i); + state_node = of_get_cpu_state_node(cpu_node, i); if (!state_node) break; -- 2.17.1