From: Mark Rutland <mark.rutland@arm.com>
To: Saravana Kannan <saravanak@google.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@android.com
Subject: Re: [PATCH v1 3/5] dt-bindings: Add depends-on property
Date: Fri, 24 May 2019 16:01:35 +0100 [thread overview]
Message-ID: <20190524150135.GD15566@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <20190524010117.225219-4-saravanak@google.com>
On Thu, May 23, 2019 at 06:01:14PM -0700, Saravana Kannan wrote:
> 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 <saravanak@google.com>
> ---
> .../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.
For clocks, regualtors, and pinctrl, that dependency is already implicit
in the consumer node's properties. We should be able to derive those
dependencies within the kernel.
Can you give an example of where a dependency is not implicit in an
existing binding?
> Also, not all functional
> +dependencies are mandatory as the device might be able to operate in a limited
> +mode without some of the dependencies.
Whether something is a mandatory dependency will depend on the driver
and dynamic runtime details more than it will depend on the hardware.
For example, assume I have an IP block that functions as both a
clocksource and a watchdog that can reset the system, with those two
functions derived from separate input clocks.
I could use the device as just a clocksource, or as just a watchdog, and
neither feature in isolation is necessarily mandatory for the device to
be somewhat useful to the OS.
We need better ways of dynamically providing and managing this
information. For example, if a driver could register its dynamic
dependencies at probe (or some new pre-probe callback), we'd be able to
notify it immediately when its dependencies are available.
Thanks,
Mark.
next prev parent reply other threads:[~2019-05-24 15:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 1:01 [PATCH v1 0/5] Solve postboot supplier cleanup and optimize probe ordering Saravana Kannan
2019-05-24 1:01 ` [PATCH v1 1/5] of/platform: Speed up of_find_device_by_node() Saravana Kannan
2019-05-24 17:56 ` Frank Rowand
2019-05-24 18:21 ` Saravana Kannan
2019-05-25 0:12 ` Frank Rowand
2019-06-11 14:51 ` Frank Rowand
2019-06-11 20:07 ` Saravana Kannan
2019-05-24 1:01 ` [PATCH v1 2/5] driver core: Add device links support for pending links to suppliers Saravana Kannan
2019-05-24 5:48 ` Greg Kroah-Hartman
2019-05-24 1:01 ` [PATCH v1 3/5] dt-bindings: Add depends-on property Saravana Kannan
2019-05-24 15:01 ` Mark Rutland [this message]
2019-05-24 22:09 ` Saravana Kannan
2019-05-24 1:01 ` [PATCH v1 4/5] of/platform: Add functional dependency link from "depends-on" property Saravana Kannan
2019-05-24 1:01 ` [PATCH v1 5/5] driver core: Add sync_state driver/bus callback Saravana Kannan
2019-05-24 5:48 ` Greg Kroah-Hartman
2019-05-24 5:52 ` [PATCH v1 0/5] Solve postboot supplier cleanup and optimize probe ordering Greg Kroah-Hartman
2019-05-25 2:17 ` Saravana Kannan
2019-05-24 13:04 ` Rob Herring
2019-05-24 21:51 ` Saravana Kannan
2019-05-24 17:49 ` Frank Rowand
2019-05-24 21:53 ` Saravana Kannan
2019-05-25 0:16 ` Frank Rowand
2019-05-25 0:22 ` Frank Rowand
2019-05-25 0:25 ` Frank Rowand
2019-05-25 2:08 ` Saravana Kannan
2019-05-25 2:40 ` Frank Rowand
2019-05-25 4:04 ` Saravana Kannan
2019-06-11 14:56 ` Frank Rowand
2019-06-11 20:19 ` Saravana Kannan
[not found] ` <CAGETcx8MY7Xhc4YjCcO9TH6X9Sse4Mg2Wi6vjau5T6d4C-itFQ@mail.gmail.com>
2019-05-29 20:02 ` Saravana Kannan
2019-05-31 23:27 ` David Collins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190524150135.GD15566@lakrids.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®