public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2] pwm: add CSR SiRFSoC PWM driver
Date: Thu, 6 Feb 2014 16:27:16 +0100	[thread overview]
Message-ID: <201402061627.17086.arnd@arndb.de> (raw)
In-Reply-To: <CAGsJ_4xmtt2Pg_mHJmvt9uc3Y4gN7KUT1UOJhbr6FQYdiAH3qw@mail.gmail.com>

On Thursday 06 February 2014, Barry Song wrote:
> > How about modeling  that other source as a fixed-rate clock in DT
> > then?
> 
> sirfsoc clock drivers have a clock node for OSC whose index is "1".
> do you think the following is the right way to handle?
> 
> in dts, put both pwm controller clock and OSC
> 672                         pwm: pwm at b0130000 {
> 673                                 compatible = "sirf,prima2-pwm";
> 674                                 #pwm-cells = <2>;
> 675                                 reg = <0xb0130000 0x10000>;
> 676                                 clocks = <&clks 21>,  <&clks 1>;
> 677                                 clock-names = "pwmc", "osc";
> 678                         };
> 
> and in pwm-sirf.c driver, use
> clk = clk_get(dev, "osc");
> clk_get_rate(clk);
> 
> to get the rate in probe()?

Ah, if that's the right clock, it sounds great, yes.

Just make sure that the clock-names values make sense from the
point of view of the pwm node, rather than referring to the
name given in the clock provider.

	Arnd

  reply	other threads:[~2014-02-06 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30  5:52 [PATCH v2] pwm: add CSR SiRFSoC PWM driver Barry Song
2014-01-30 19:49 ` Arnd Bergmann
2014-01-31 12:05   ` Barry Song
2014-01-31 15:23     ` Arnd Bergmann
2014-02-06 10:21       ` Barry Song
2014-02-06 15:27         ` Arnd Bergmann [this message]
2014-02-07  2:30           ` Barry Song

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=201402061627.17086.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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