Received: by 10.192.165.156 with SMTP id m28csp1831454imm; Thu, 12 Apr 2018 04:23:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx48j5hPTFH8rj+72I54A/W6JR7glySJaTM30vN2FxywQj5C5+U9p1jjhnJ9UFIFizV0CqiXQ X-Received: by 2002:a17:902:758d:: with SMTP id j13-v6mr597260pll.334.1523532237201; Thu, 12 Apr 2018 04:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523532237; cv=none; d=google.com; s=arc-20160816; b=vJXQvfVncWMIK5ReIJsTtt6p2bE1MiRrYhysCb4vphlJ8Y8Vkxh0k90V19ccTlBESQ GTnrHhjymm7bFAwzYxv8vf1l5VIG78mMaFmxe2S1dQrdNnNKohMwHOmRtvcdOBltApwV 3sPJQDPxGm4lhC7XmmhUcP8YZwMEgDFbvSeq34hAscVvQpbwtgvlPylWS3l1EkjaDQl8 FdBTRWB4dr79KrkBmxmJsb+ab+xMyOcYDp+D/teTLTFKVY/s5avt5hGWQ0mIMizerJXa O9UyCEAqEUFE2A8e0+71WEmfOq4lwbBp9DQlw5uEHl1xb6kPhSOo1M36D8E2tyWvG8aG Tosw== 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=wNxOIumF5VO8wdO7axQyrg1Yf0ybJeBuC4ybXh+k+I4=; b=Ph7NH6jCPnhnaT3gVzyc3dUxLSypLaAJZCEStsAjg0ttzSTMCp4eg44t2BU8x5zM4a BC4a7t9YwqzAPnyDb296UMjUAAaXm3XO5j4h58aeUUDKHGukgBRV8VanKpCwv7Kud5Pg ti/wEuo46fNRZ08phrXjVcadWOLFGOQ0PprcjuBg72MUyZDA/yC97l+e+2YwzJN5/ckp DBqlAla2sA0Yi8AwdHMvEl3qynesOccIbYKgetl4KXSmXI3giLejMfsbUh0jTOATDUgQ F5qPo43zzvNSbGgV3ML35XQShXpNfKRnCVnbwy5Sb2nlKdo/gRT6uxzuHGJBX4vX/3hL ZOow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O8WhQWRG; 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 j5-v6si3122324plk.506.2018.04.12.04.23.20; Thu, 12 Apr 2018 04:23:57 -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=O8WhQWRG; 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 S1753372AbeDLLS5 (ORCPT + 99 others); Thu, 12 Apr 2018 07:18:57 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:46740 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753122AbeDLLPB (ORCPT ); Thu, 12 Apr 2018 07:15:01 -0400 Received: by mail-lf0-f68.google.com with SMTP id j68-v6so7095268lfg.13 for ; Thu, 12 Apr 2018 04:15:00 -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=wNxOIumF5VO8wdO7axQyrg1Yf0ybJeBuC4ybXh+k+I4=; b=O8WhQWRGFjMZMMxvRJen+/XKvYxf1lramgnS/wOTD+s+mrxlzym3vrs4iggBF7XCk3 Z51YnM1Efs2PtSV8PwlHPzXmT2JfjZkpiXCnJlSdGlNP3wFNm7xbTZJ/hYuod6826Wqk r7i2T5YHCQyST5ZosDeSf4ozleHNcclvSZR0A= 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=wNxOIumF5VO8wdO7axQyrg1Yf0ybJeBuC4ybXh+k+I4=; b=f7xOX8Ff5FRCZDNWVF/OMf71jJ16QnZ01vjxjk/j2oZ1Y1rP5BfqfyTV1frINuYT+3 xJw3XRxqWBGw07m1lSvdw3pGzNPXv3YmTjccbreuImWPpBHVTFdD+j5RlZhLJSsFBfhq lVMkhBkKi5ppmH+N8zF0tz6tbG0koU0HoavG0Cbn5cdF6niNPLlt8AkPGUEi/dmOAaUp PnZzH5iVWziBjt+w5z8iC89SVYDFfhdwCscQ4UpS0v9AlGsmWjGauxVsSVQUZlwsgPBp 6GE8TV7j0GkMBkcftLipg0yUPFcqIc3kD9UVl89n0EnLlfxk+XqoUSz/UwzhTCLehnWr SB1A== X-Gm-Message-State: ALQs6tCjv50KbWNpUXPz67NQCX5726vj5yy49TJYcbk9uCF5ErTrXeQk U7U9kLeIPqTB3lLroxlusLcbRA== X-Received: by 2002:a19:1122:: with SMTP id g34-v6mr4714707lfi.6.1523531699615; Thu, 12 Apr 2018 04:14:59 -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 r29sm543187lje.72.2018.04.12.04.14.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Apr 2018 04:14:58 -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 v7 12/26] cpuidle: dt: Support hierarchical CPU idle states Date: Thu, 12 Apr 2018 13:14:17 +0200 Message-Id: <1523531671-27491-13-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523531671-27491-1-git-send-email-ulf.hansson@linaro.org> References: <1523531671-27491-1-git-send-email-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 53342b7..13f9b7c 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.7.4