devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: devicetree-discuss@lists.ozlabs.org
Cc: Mike Turquette <mturquette@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Saravana Kannan <skannan@codeaurora.org>,
	Shawn Guo <shawn.guo@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: [RFC] gate clock binding and descriptiveness of bindings
Date: Mon, 17 Dec 2012 20:50:48 -0800	[thread overview]
Message-ID: <50CFF628.4010208@codeaurora.org> (raw)

Hi,

I'd like to propose a binding for gate clocks so that we can discuss how
descriptive devicetree clock bindings should be.

Binding for simple gate clocks.

This binding uses the common clock binding[1].

[1] Documentation/devicetree/bindings/clock/clock-bindings.txt

Required properties:
- compatible : shall be "gate-clock"
- #clock-cells : from common clock binding; shall be set to 0
- reg : shall be register containing bit to toggle to gate/ungate the clock
- enable-bit : shall be bit in register to set/clear to toggle the gate

Optional properties:
- clock-output-names : from common clock binding
- clocks : shall be the input parent clock which is gated by this clock.
- set-to-disable: if present, indicates bit must be set to disable the clock

Example:
        gate {
                compatible = "gate-clock";
                #clock-cells = <0>;
                reg = <0x45 0x4>;
                enable-bit = <1>;
                clocks = <&osc>
        };

This seems to capture what the gate clock needs, minus the spinlock
which can't come from DT.

Some starter questions:

1) Should we have two compatible strings, one for the "set-to-disable"
clocks and one for the "set-to-enable" clocks instead of having a
property "set-to-disable"?

2) Should we specify the enable bit as a property or should that be
handled by software? I.e. is it too descriptive to specify the bits
within a register that do something?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

             reply	other threads:[~2012-12-18  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18  4:50 Stephen Boyd [this message]
     [not found] ` <50CFF628.4010208-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2012-12-18 22:30   ` [RFC] gate clock binding and descriptiveness of bindings Mitch Bradley

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=50CFF628.4010208@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=shawn.guo@linaro.org \
    --cc=skannan@codeaurora.org \
    /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;
as well as URLs for NNTP newsgroup(s).