Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2467878ybm; Thu, 23 May 2019 18:03:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2/IcA3XOzsJ5lXLiCz96Wv9nwFM3fCrv7zk2Z/y9VzUv+co4xVJs0PLxruQOCmJPPccSe X-Received: by 2002:a17:90a:17c7:: with SMTP id q65mr5567778pja.92.1558659826857; Thu, 23 May 2019 18:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558659826; cv=none; d=google.com; s=arc-20160816; b=0ToLEmrjO2ZWPwWuWlguFcmVmcRSRTe0qTGZfVzIYyq9fKnKtZiigRYFBVbL/sVHxy NpQyxws/cwZA4Mj4273WB9LaXBeWhjKDCdNukOcT9HED1HudSD+U+xjWH87LplJgZXVK xTm1dgIdNIJD3J8dlk8fpXjUWz/uvW/S0KdxzsZlkVIbqVj55aOfQ5g5T5Om7QLAptbm obM4s7Tlk733aC0eiVvu4Qp547VBX33BTbb/BQAHun4w3MyOEehKquIlKIEt0B3HAsTI bQ7ffrL020Cxl+CazKHjcnocyp5k+qOlNo0DTs+BL/WiHH5rPxL8WR8OqcVrS6mQMiSn e6Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=2KTzGfh7kv2d74sdNHCbcBSbV7diWdzXOMvg7FHNFO4=; b=hz9gJbr8RofyN9SkQrZ57JZpe+LFoCEtn75O6wF1oDkPQ9EkuexyvYyIDeTarKtVSg IvHggybdJK4m1QYk6SYyeNoO58tKBS8JouJ8h0KlLT0Jj9nfJKpdadjmgupsp4k4MWYH FQSm7O20kGL50QrTuJpcsancbkk0Xe7C2eT7JKlk4l6Mps65cZBQYV06z7SEuvFBAZVv 2u1v+k0+1OuCRoSUBbpbYyojPs/bVDr3gAmhGPNBYLvUkPKRZdmyszR8I8HiVS4XGydP iaYsqYxiCZIUKp8kpkPk6DodRmrtZJwnWV2B7yPPWgSU5hSYeGeHm98iijshEph82IkS WhpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mzVi6jzF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h21si1970986pgv.266.2019.05.23.18.03.24; Thu, 23 May 2019 18:03:46 -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=@google.com header.s=20161025 header.b=mzVi6jzF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388765AbfEXBBm (ORCPT + 99 others); Thu, 23 May 2019 21:01:42 -0400 Received: from mail-vs1-f73.google.com ([209.85.217.73]:50706 "EHLO mail-vs1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388739AbfEXBBl (ORCPT ); Thu, 23 May 2019 21:01:41 -0400 Received: by mail-vs1-f73.google.com with SMTP id e204so1591477vsc.17 for ; Thu, 23 May 2019 18:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=2KTzGfh7kv2d74sdNHCbcBSbV7diWdzXOMvg7FHNFO4=; b=mzVi6jzFMqv5OndYo44UnYwAhp/A1s7mSJixeVtrzL1SVdbFUMPmss/UpVBpcK2mc3 6JpipzeOt8PNkpGmfs/KNDBwojsxWQhnbvFSWCPvODpQxqnwNZvuphHTsiZuxW+hWTs3 90uA475RD1L9eUFxtVZS2p1a28mz80YhxFcg2EDFAMIgCM9kY7aGY/LD9rj0H7NjEWBP kZ03tZrj5JvYHanoyWT+MuTKJl5nzc6Q8Yoj5GWgpk1ntNX3rOqhNCoS5n2fD2X1WJPE JQSqb6guVKK+BSJNK+xqvFKlu2iLmlh/Rgs6eB/nDW6YPTBjwQOliV0UVVIbJRaj6XLr WiTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=2KTzGfh7kv2d74sdNHCbcBSbV7diWdzXOMvg7FHNFO4=; b=tHEZ+/mNb6jR3Rc7evw75pYAdIu3xrdWOZNZqEACu2uc5OtVNjbqhgh2mdmvCnKuFo sxehACMhAEe7mY5Tl7WxjEryftltuLtr8pzcDyslwLRTV7iI8JVZxxBQPTvHVwl2mhME wNUUKPKp5CW5a6xpcmg5MYngLnFyTuxb2EfVPRnTkWUDC5HGE2/AtWPb99f8K2FTyRy+ K+krU862ZSDgVd/ZvMDD5nbywvFKntNBNPCJJLc1r14C3/QrU9Z1y3GxRYTxhQe1C6CW 1rXhn61gOlhlpwdm2CL37QuqrcZqrI3MTL7nPTGrAJZ1+Q2X918aRD+TqwIeRLWVcVC+ FA+A== X-Gm-Message-State: APjAAAXo2ku60QEmLFRWcsR/13cIgHJA+K7UI7NtCKcQ7W13J3BCa33i 8CKAt2puWp3VW6yL6RdUrlv/s1MVVLXjTwI= X-Received: by 2002:a9f:3241:: with SMTP id y1mr9499048uad.107.1558659700238; Thu, 23 May 2019 18:01:40 -0700 (PDT) Date: Thu, 23 May 2019 18:01:14 -0700 In-Reply-To: <20190524010117.225219-1-saravanak@google.com> Message-Id: <20190524010117.225219-4-saravanak@google.com> Mime-Version: 1.0 References: <20190524010117.225219-1-saravanak@google.com> X-Mailer: git-send-email 2.22.0.rc1.257.g3120a18244-goog Subject: [PATCH v1 3/5] dt-bindings: Add depends-on property From: Saravana Kannan To: Rob Herring , Mark Rutland , Greg Kroah-Hartman , "Rafael J. Wysocki" , Frank Rowand Cc: Saravana Kannan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com 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 The depends-on property is used to list the mandatory functional dependencies of a consumer device on zero or more supplier devices. Signed-off-by: Saravana Kannan --- .../devicetree/bindings/depends-on.txt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/depends-on.txt diff --git a/Documentation/devicetree/bindings/depends-on.txt b/Documentation/devicetree/bindings/depends-on.txt new file mode 100644 index 000000000000..1cbddd11cf17 --- /dev/null +++ b/Documentation/devicetree/bindings/depends-on.txt @@ -0,0 +1,26 @@ +Functional dependency linking +============================= + +Apart from parent-child relationships, devices (consumers) often have +functional dependencies on other devices (suppliers). Common examples of +suppliers are clock, regulators, pinctrl, etc. However not all of them are +dependencies with well defined devicetree bindings. Also, not all functional +dependencies are mandatory as the device might be able to operate in a limited +mode without some of the dependencies. + +The depends-on property allows marking these mandatory functional dependencies +between one or more devices. The depends-on property is used by the consumer +device to point to all its mandatory supplier devices. + +Optional properties: +- depends-on: A list of phandles to mandatory suppliers of the device. + + +Examples: +Here, the device is dependent on only 2 of the 3 clock providers +dev@40031000 { + compatible = "name"; + reg = <0x40031000 0x1000>; + clocks = <&osc_1 1>, <&osc_2 7> <&osc_3 5>; + depends-on = <&osc_1>, <&osc_3>; +}; -- 2.22.0.rc1.257.g3120a18244-goog