From patchwork Fri Dec 20 22:08:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 304309 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8A9E82C0079 for ; Sat, 21 Dec 2013 09:09:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755630Ab3LTWJI (ORCPT ); Fri, 20 Dec 2013 17:09:08 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:42612 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755314Ab3LTWJH (ORCPT ); Fri, 20 Dec 2013 17:09:07 -0500 Received: by mail-wi0-f182.google.com with SMTP id en1so4299397wid.3 for ; Fri, 20 Dec 2013 14:09:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=kP01FD4VZao1jh0c2RJFA3MPkwF2GpGtVH6QtZzFwt0=; b=iOrg4saVqFN5/U6LEjRfT2bDRZH7/fSoNFrcDCQFQ9tSGKvm9iuhFVFe+MtF+cWOIQ emrzUQG77mogizDcxl9rZzNHYdBNyKu0Efmx8DZI82mvVpRVUWiAX5XHM9h7EkjLRV2r QlRBEUblJ3QKFvbGM77oVQllAl+xDmiPvPXZtpokrw4J1VwnUX0qdsTGSUoJVF18NWhC Q28J75ie8QQP3bqF+NjRlKdeFb8UBXnJNsfhAF/kQ0+C+EwT9Hpuws1BNfMFKKuXvtOL TF9HqWElTr88sHprkSLvd0/LO7SiBmarq2MKlekdbwaYBzRSld8BLbQ97dBMuTN4IXS/ B68Q== X-Gm-Message-State: ALoCoQnHEA/rk9DI0UlCLhDNxQzqfqneB9ZBgYhPTfKDUW5jKn4v5hZJcLzqVkqTc1TsbKuspaan X-Received: by 10.180.83.1 with SMTP id m1mr9456244wiy.9.1387577345675; Fri, 20 Dec 2013 14:09:05 -0800 (PST) Received: from radagast.lan (jahogan.plus.com. [212.159.75.221]) by mx.google.com with ESMTPSA id d2sm19557143wik.11.2013.12.20.14.09.04 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 20 Dec 2013 14:09:05 -0800 (PST) From: James Hogan To: Mike Turquette , Russell King , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, James Hogan , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring , Stephen Warren , Rob Landley , linux-doc@vger.kernel.org Subject: [RFC 1/2] dt: binding: add clock-N-frequency to common clock bindings Date: Fri, 20 Dec 2013 22:08:46 +0000 Message-Id: <1387577327-5007-2-git-send-email-james.hogan@imgtec.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387577327-5007-1-git-send-email-james.hogan@imgtec.com> References: <1387577327-5007-1-git-send-email-james.hogan@imgtec.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a property "clock-N-frequency" to the clock consumer bindings to specify the frequency that a clock should be configured to when it is made use of. N is the index of a clock specifier in the clocks property, starting at 0. This avoids the need to add clock-frequency properties to individual device bindings or modify drivers to set the frequency of clocks to that requested in device tree. Instead the driver can just read the rate of the clock as if it was fixed. This is aimed at devices where it's difficult for drivers to determine what a clock should be set to, and either there is a recommended frequency for the particular system or a chosen frequency for the particular application of the system (which makes it essentially configuration data). Signed-off-by: James Hogan Cc: Mike Turquette Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: Ian Campbell Cc: Mark Rutland Cc: Pawel Moll Cc: Rob Herring Cc: Stephen Warren Cc: devicetree@vger.kernel.org Cc: Rob Landley Cc: linux-doc@vger.kernel.org --- Documentation/devicetree/bindings/clock/clock-bindings.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index eb65d41..e8bca1a 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt @@ -60,6 +60,9 @@ clock-names: List of clock input name strings sorted in the same clock-ranges: Empty property indicating that child nodes can inherit named clocks from this node. Useful for bus nodes to provide a clock to their children. +clock-N-frequency: Single cell specifying the frequency in HZ to set the N'th + clock to when it is used. N=0 corresponds to the first clock + specifier in the clocks property. For example: