Received: by 10.192.165.156 with SMTP id m28csp806481imm; Fri, 13 Apr 2018 08:08:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx48EwxNbPQg04JFOqxMKjmdsp6c+61Y9iavqmnL+O9prfFElwPAkhvzVJGGmFYPp/L42FrGe X-Received: by 10.167.133.85 with SMTP id y21mr11775703pfn.139.1523632108174; Fri, 13 Apr 2018 08:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523632108; cv=none; d=google.com; s=arc-20160816; b=L2pFHeL4VGGR25PLeVUMhjy4Kgc75XN/kN7DutoPv/Pn/qrw7h/2j55yPMeIv5Mxt0 i//vulE/IuL3wIDJ+qurU3D/9QZGys+evEGsFJUVbeShaKT2HR9ANDCQiTiW7x5iJIag 7ZlaRFI3NrrLrwaLZUZEHgGd4DkeuZJjMIfBD4vsiAUcIKrCfvx7Wue2NY05SOcq0N+v SVh+RLVREGVv82vIE+lVLMTN5XTDS+YsT4WCBJgRZa+OyO6w7gL5xCdZ0BxEuJUvTlhE zCZagnta8RKbGkqUPgnbgtT5iOgwA5rUIgVoDOsaXPd3AxP7YJCvqzOoOeED3rOEmlL8 gOIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=QOsMAcntLotwTuxxwDSx5n4CWAOB8p/neC5BCmlYJjY=; b=Zd1k8bYfgxliNAHOJVrhTma1YEMVBE9QiKWWQ+hNZQ5zs8jvWXJhwviSRM0oFn0L/q WYECkMdwy8LH/naz1QqO3SGZdqa1QM0F0lOLOAbOE9qdK2Ezp/I0YCzOtt3F9kHLYpny v/cSpOwO6nY6Z5Eb+IXafZjc6bQ1EuzWix2/k885dkChH72EkOoz1rkXNZMUR8YEsG6S FDuMymwnhjdV6RVVi426+bMRA3tSLP9pF3Jpe/PphkPcHfgCU+1V+loa5nBWiDwoLqvF 8VfJ3BdIF2y+WAn0eKSZ8xR5VroPF8FWjqwfTopm8OYp0l6ZxnU1HeY28aIHNL4vxc4f WwDA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si4134392pgc.532.2018.04.13.08.08.14; Fri, 13 Apr 2018 08:08:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751141AbeDMPFl (ORCPT + 99 others); Fri, 13 Apr 2018 11:05:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:36082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbeDMPFj (ORCPT ); Fri, 13 Apr 2018 11:05:39 -0400 Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 00AF221795; Fri, 13 Apr 2018 15:05:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00AF221795 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qk0-f174.google.com with SMTP id j73so9416537qke.6; Fri, 13 Apr 2018 08:05:38 -0700 (PDT) X-Gm-Message-State: ALQs6tB5ZFLETIjhI/j2nafaHLt1Unob/O9FQEDU7ejj5SfL46o6yu4m yh1s9xWsbacC113X/UB0DH2Oze4b3fzBz/5A4g== X-Received: by 10.233.235.139 with SMTP id b133mr4974493qkg.348.1523631938115; Fri, 13 Apr 2018 08:05:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.213.166 with HTTP; Fri, 13 Apr 2018 08:05:17 -0700 (PDT) In-Reply-To: <1523531671-27491-12-git-send-email-ulf.hansson@linaro.org> References: <1523531671-27491-1-git-send-email-ulf.hansson@linaro.org> <1523531671-27491-12-git-send-email-ulf.hansson@linaro.org> From: Rob Herring Date: Fri, 13 Apr 2018 10:05:17 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 11/26] of: base: Add of_get_cpu_state_node() to get idle states for a CPU node To: Ulf Hansson Cc: "Rafael J . Wysocki" , Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , linux-pm@vger.kernel.org, Kevin Hilman , Lina Iyer , Lina Iyer , Daniel Lezcano , Thomas Gleixner , Vincent Guittot , Stephen Boyd , Juri Lelli , Geert Uytterhoeven , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-arm-msm , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 12, 2018 at 6:14 AM, Ulf Hansson wrote: > The CPU's idle state nodes are currently parsed at the common cpuidle DT > library, but also when initializing back-end data for the arch specific CPU > operations, as in the PSCI driver case. > > To avoid open-coding, let's introduce of_get_cpu_state_node(), which takes > the device node for the CPU and the index to the requested idle state node, > as in-parameters. In case a corresponding idle state node is found, it > returns the node with the refcount incremented for it, else it returns > NULL. > > Moreover, for ARM, there are two generic methods, to describe the CPU's > idle states, either via the flattened description through the > "cpu-idle-states" binding [1] or via the hierarchical layout, using the > "power-domains" and the "domain-idle-states" bindings [2]. Hence, let's > take both options into account. > > [1] > Documentation/devicetree/bindings/arm/idle-states.txt > [2] > Documentation/devicetree/bindings/arm/psci.txt > > Cc: Rob Herring > Cc: devicetree@vger.kernel.org > Cc: Lina Iyer > Suggested-by: Sudeep Holla > Co-developed-by: Lina Iyer > Signed-off-by: Ulf Hansson > --- > drivers/of/base.c | 35 +++++++++++++++++++++++++++++++++++ > include/linux/of.h | 8 ++++++++ > 2 files changed, 43 insertions(+) Some reason you didn't add my Reviewed-by from v6? Rob