Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2761919imu; Thu, 29 Nov 2018 09:48:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vbr1ReN3VgOInS1uEtJvGn+W5EGvU2j046QI5gVtj+DsGmq3K61iIA9oQ5toH4U3LJS+D6 X-Received: by 2002:a17:902:4a0c:: with SMTP id w12mr2319620pld.8.1543513722110; Thu, 29 Nov 2018 09:48:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543513722; cv=none; d=google.com; s=arc-20160816; b=PmHyT0K+4B62steEbTct0zsA38HmxBPCwbCXTLLBpC+cTDbBvP4rX0r7MXreN1nZvR qnb/JEAx6i5aNmz0SqLrtft892uFjgVmrWLPOcLF8b5Eh4Ocg26PlN7P1DcMkTOzpaxd pngCap8t6hDq4Ro9mWQ3NNCB0Zy72UxwWz6kP4LV2XA3527YTWAoglsmDo/jHUtWrWQ5 ukVZ8FzvwWKHuFKZbC6Rv2wMBOEkjevDglwWIUp5arXEJTmu/INio5EKcDszQDhFiAa+ BCkeIxCtDcxNxC0DJn51+JrpfJcngBHAleqLhMlfuLfoV4MkueDpJ/IHeSjdmQknWw9R DRtg== 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=GHVkWH3PSWyA/cWKlkRJqeV/OFZetQXn2GZtzBG/OUI=; b=RjiWA2yLLwByeg98W2qT13wiTKWUUO0gLk91okSfzjotuvVhpyAlDJ2o6+10X374xQ P19NjJJwzVq3SDxH6bLJFcmL2GGB8G2xwv4YNhS8CLOD4mTBNLeB5oMVVmApPdEqZ4NM ON9AKZ0UbcFgMPkyS/fJpYs3uRHk7rtAs+i0yBP4cON+qQEP1vT81EviSrnoOOcg8IaY /WrsUh/S2DKrerAbvWx2v7QAB7t0pBzJiZC+XbvEOI2F0irLxPYDUqos9rEUSq2Ti7wc TpHGD7idt7zTTYWwjf8IPROn7JymlK/WNXuGJOpD4LRhCKx/1N8N4yZMGXZgtp7ovEMA SerQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bd0qIXUo; 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 t2si2586769plz.344.2018.11.29.09.48.26; Thu, 29 Nov 2018 09:48:42 -0800 (PST) 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=Bd0qIXUo; 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 S1730858AbeK3Exd (ORCPT + 99 others); Thu, 29 Nov 2018 23:53:33 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42856 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730751AbeK3Exc (ORCPT ); Thu, 29 Nov 2018 23:53:32 -0500 Received: by mail-lf1-f68.google.com with SMTP id l10so2096035lfh.9 for ; Thu, 29 Nov 2018 09:47:21 -0800 (PST) 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=GHVkWH3PSWyA/cWKlkRJqeV/OFZetQXn2GZtzBG/OUI=; b=Bd0qIXUoNE817ai3HRpnThklH0wMCE/mlCss7tY0ZMJQu/RMVZP851QMoOYySBQEd2 mEQ06t46GXwZVqcrZtRsDj/admhdsTMjYhu6F8WdNMNgeuZYdXY+iLagQIw3oe87sTki s/tCdK3NWK58gBap3Uzx1VWgQBXoftGQryias= 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=GHVkWH3PSWyA/cWKlkRJqeV/OFZetQXn2GZtzBG/OUI=; b=Few6Yih9WJT2mdMnoc5vWovcIgJ87pw6fROQH1I89qiaAyQVLOqBQLc2NFSEjmsC4u RYCeinq4g3ljk4UM3ORESAzt8/kWxd4kMEB9FMSlIv1sFTmoDYHh9WliI9smVVquyFm4 kIobw2+WG/CAShaQ+d+LvX6tAyrwC+3z5PmmkUgtYH9itwhxkDNaxwfuatsn5ZE+bxAe EMFQZ2H+7r8Fb34uPk7LegKLNr+nwc67NacJyX9g6Ta2aC5jsseICGDpmX+MxNBOQWT4 N/0CopsZh+8GUYy1VSCl8SD3IdbWu8lV+WKzPRwrx8VqeTeqRsosuZug6GfmPFNev4ZY yShw== X-Gm-Message-State: AA+aEWasIKuxsxrde8fLGn/eDqdY8YzYrX6lYctj9QLFZMFX6bQDQwHG 7KNzMb3KdygeY3VoIuSGla2NYg== X-Received: by 2002:a19:d90c:: with SMTP id q12mr1603187lfg.24.1543513641080; Thu, 29 Nov 2018 09:47:21 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id j76-v6sm393983ljb.12.2018.11.29.09.47.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 09:47:20 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Daniel Lezcano , linux-pm@vger.kernel.org Cc: "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Ulf Hansson , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Lina Iyer Subject: [PATCH v10 07/27] cpuidle: dt: Support hierarchical CPU idle states Date: Thu, 29 Nov 2018 18:46:40 +0100 Message-Id: <20181129174700.16585-8-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181129174700.16585-1-ulf.hansson@linaro.org> References: <20181129174700.16585-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(). Cc: Lina Iyer Suggested-by: Sudeep Holla Signed-off-by: Lina Iyer Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson --- Changes in v10: - 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 53342b7f1010..13f9b7cd32d1 100644 --- a/drivers/cpuidle/dt_idle_states.c +++ b/drivers/cpuidle/dt_idle_states.c @@ -118,8 +118,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; @@ -176,7 +175,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