Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1036710imm; Wed, 20 Jun 2018 10:29:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKrISA7zvuJ5hl0cIleRpo9szAowNyZw9ORIyZo/EywESicmaONAhu2snz01yNPf6Exo0GU X-Received: by 2002:a65:6142:: with SMTP id o2-v6mr19938972pgv.347.1529515765986; Wed, 20 Jun 2018 10:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529515765; cv=none; d=google.com; s=arc-20160816; b=ygQ0aUPgimYVgNpfzpkiHPU41crluy3crVDS2rV8G7H8M5AYT2lEGWn0XmM/mdjTQY vdgqaAsq30hsXXaCEx/QFghHdsF9h0JN3mHfpeHk40YEAhcT4r8FbGDzVt51pgLWrJCl rB0Sn9QWQKQJCfhHPcI+OXtRkmC5JGeRiJEu74VxWHkxnSVUR8xSNCSBXI9aSgy5c/5g VuKMTasfrhMhZV09yejBmPIPJ7gvgcV6RnXrjF2m0od0K4OWRemLJ/JiQ75S+4B+O3gz 3Y/AJPkwVDTKmntogQdNsexzsahk4r5EWZ+ZRlEKuHnF2SXQe0Yxh9WgZL9sBqaH++1s NdLQ== 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:arc-authentication-results; bh=NdOVQOgn6QPfKNtGaQ+NXVIYYOcD0EuuWacQGnuhPH8=; b=vdpFEG00h6CLKpze329Ndpx3/Xhl//nnLU3rOiKnpGT3Awh8GvoZ2SQF9YMz2+p69L LG5lMcG9ccKIc0rGxwKQntT5JeJVPNusnj3CoFyvT81EhfvsvdQUFksbfbpoFO1DB7NR EFQpyjoj0vko6ptx6u2QYlsdlEykM9JJd7Vy52dO4/REHxgq65HZzsyDJsJKLp4Vz7xl /s+qo3LMta7NX3vt57r9ygR3qO/6JOR7NXsWzr6eJZqUzCjk5TFds62DprRHXUEUEW4v NBAIpTF9Cuw+bXQH3Fp2XtV5dEqBkRTyIZqHlCiRB4uK+I5pe44nM+VkG8/MP40s9GWP jwDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bxj+tfnA; 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 a89-v6si2912395pla.177.2018.06.20.10.29.12; Wed, 20 Jun 2018 10:29:25 -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=bxj+tfnA; 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 S932965AbeFTR1D (ORCPT + 99 others); Wed, 20 Jun 2018 13:27:03 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:40140 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932341AbeFTRW6 (ORCPT ); Wed, 20 Jun 2018 13:22:58 -0400 Received: by mail-lf0-f68.google.com with SMTP id q11-v6so468542lfc.7 for ; Wed, 20 Jun 2018 10:22:57 -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=NdOVQOgn6QPfKNtGaQ+NXVIYYOcD0EuuWacQGnuhPH8=; b=bxj+tfnAw37NyvY0WdDlwmR2qXNymUJepXFf+P3xWNtcQLIdfTA+QUNwlDOT2aL4rE GM7+CwE+5ixNl5W/l0aEM1mbXWeu+Vk9TD9OsYNRI+UuBLq/aSS1tuUsnhji8QuIIg9x fQxj0s8Q9sigqbWr3o/w0fUPJax0r2uKeKneM= 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=NdOVQOgn6QPfKNtGaQ+NXVIYYOcD0EuuWacQGnuhPH8=; b=rjnvrI7qbyRFo/CdpYE8rO3FMTiUjLJlBOyc9g4e6OSIxGkkGiOCVkVVfvf8zjyEJf ZFKySijHRr7vbX2qW1Xk0KHFTtzwEV2pLFesb48Ec580YT+Ow42kZUy05xiGBT/Qqs/L SLzuDDfGcxrXX3SmzheDZV6aqH+nta/kwua/itfeV1XLswKgAbX7Gx1Cvk8v71Fsjnv2 PUTKoXWZYJ7B9X24fchZVN8zR2kyCxI4WanPkwyn68rNBvxpj95BU0AvNDkBsgb+ReGU Y4uvjg3tbtKGwp3k7NFhW6qZJklaXkFAb1QKUsg8hIJj5ALDlycIGSYpdpRnjphsgBYe nluA== X-Gm-Message-State: APt69E0I/7G5yFwy8pUn79EmOgpAH2H4BO8iRfHMV4m0QF+ZMDsOOyb8 3XA3ZV3lka3RuvFJdNGT4yLvig== X-Received: by 2002:a2e:1710:: with SMTP id l16-v6mr15565951lje.74.1529515376747; Wed, 20 Jun 2018 10:22:56 -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 b2-v6sm514441lji.85.2018.06.20.10.22.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 10:22:56 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , linux-pm@vger.kernel.org Cc: Kevin Hilman , Lina Iyer , Lina Iyer , Ulf Hansson , Rob Herring , Daniel Lezcano , Thomas Gleixner , Vincent Guittot , Stephen Boyd , Juri Lelli , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 12/26] cpuidle: dt: Support hierarchical CPU idle states Date: Wed, 20 Jun 2018 19:22:12 +0200 Message-Id: <20180620172226.15012-13-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620172226.15012-1-ulf.hansson@linaro.org> References: <20180620172226.15012-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 --- 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