From patchwork Wed Jun 14 09:21:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 9785885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7838B602C9 for ; Wed, 14 Jun 2017 09:22:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F118285E3 for ; Wed, 14 Jun 2017 09:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63C09285EB; Wed, 14 Jun 2017 09:22:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06268285E3 for ; Wed, 14 Jun 2017 09:22:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953AbdFNJWM (ORCPT ); Wed, 14 Jun 2017 05:22:12 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:32846 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbdFNJWJ (ORCPT ); Wed, 14 Jun 2017 05:22:09 -0400 Received: by mail-pf0-f175.google.com with SMTP id 83so81546959pfr.0 for ; Wed, 14 Jun 2017 02:22:09 -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; bh=4rmevh1LbuiqMSfv/g8sKaYdx4VdkhaU1/kipFdNA7U=; b=KppmB9frDG7zYN/VTOMpIRVQV279kAuyUm+6e2/OOespNUoLrK6/5AkU3x1vi9au3S yAZk0JBCKzykWyCPlBA+rLFU4tr0fN/qql+KsatDice1FIRHxcEvlSjKgroY4DbJMWLH UbIgLATlMSP4+Ov4KIC+GnTbWPoyxH18X/R3w= 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; bh=4rmevh1LbuiqMSfv/g8sKaYdx4VdkhaU1/kipFdNA7U=; b=jIGbk0fZ1L81T0/yeYht9KYeoqoiE+txbc8/9c0bk2Qp7yZgiGOarHOTQrJekixCB3 I5d7QVkqj0ftDtQhqGS0pq1N6TqW6gtWrRPtJTOebUEyBV+7zynywE8bbrnpI7IXoVgK KdFD3yYhv/PkzFYeuwnJpoFiEcJaQLyxKdYM4DnVWvFV8/Z/VLu2Ha4bhbnGpGWXDjOT kkJiUMgq/txuGle+12oLYBDnSlOgy01jd5SyHVMapxPXOsLoOj39v91XwWTsxrNuhTmA IIERtX2ec3AcR1dmPMnMpj/Ixr9TCBAf88Ny3USpadKzOXGrC9xZz7YoCjt2mJFPPU/y cfBA== X-Gm-Message-State: AKS2vOzxZp2cJuKGN54mPBsLqarMkxSaj6V8f8W4RMbWkHeiuzh0vdgM mSXfm9xGUi2+Dbo4 X-Received: by 10.99.168.67 with SMTP id i3mr3393359pgp.23.1497432129073; Wed, 14 Jun 2017 02:22:09 -0700 (PDT) Received: from ubuntu16.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id t82sm1064872pfe.88.2017.06.14.02.22.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 02:22:07 -0700 (PDT) From: Chunyan Zhang To: robh+dt@kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org Cc: mark.rutland@arm.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, zhang.lyra@gmail.com Subject: [PATCH v2] Documentation: clock: address more for clock-cells property Date: Wed, 14 Jun 2017 17:21:44 +0800 Message-Id: <1497432104-22609-1-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The value of property 'clock-cells' is not determined only by the number of clock outputs in one clock node, it is determined by whether the clock output in this node can be referenced directly without index. If the output clock has to be referenced by a index, the clock-cell of this clock node can't be defined 0. Signed-off-by: Chunyan Zhang --- Documentation/devicetree/bindings/clock/clock-bindings.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index 2ec489e..e2b76b4 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt @@ -18,6 +18,9 @@ Required properties: with a single clock output and 1 for nodes with multiple clock outputs. + There's one exception, please see the description for + clock-indices below. + Optional properties: clock-output-names: Recommended to be a list of strings of clock output signal names indexed by the first cell in the clock specifier. @@ -48,6 +51,13 @@ clock-indices: If the identifying number for the clocks in the node is not linear from zero, then this allows the mapping of identifiers into the clock-output-names array. + This property not only servers for clocks with multiple + clock outputs, but also for clocks with a single clock + output whose identifying number is not zero. + + So long as clock-indices is set, clock-cells cannot be + set zero. + For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: oscillator {