linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NOGUCHI Hiroshi <drvlabo@gmail.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: John Crispin <john@phrozen.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-mips@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [RFC v2 1/5] clk: mips: ralink: add Ralink MIPS gating clock driver
Date: Wed, 1 May 2019 19:58:43 +0900	[thread overview]
Message-ID: <63290737-8f9a-3d17-77ed-d5417a58294a@gmail.com> (raw)
In-Reply-To: <155622043597.15276.9250071449626345612@swboyd.mtv.corp.google.com>

Thanks for suggestions.

>> +{
>> +       struct clk_hw *clk_hw;
>> +       const char *name;
>> +       const char *parent_name;
>> +       u32 val;
>> +       int cnt;
>> +       int num;
>> +       int i;
>> +       int idx;
>> +
>> +       syscon_regmap = syscon_regmap_lookup_by_phandle(np, "ralink,sysctl");
>> +       if (IS_ERR(syscon_regmap)) {
>> +               pr_err("rt2880-clock: could not get syscon regmap.\n");
>> +               return PTR_ERR(syscon_regmap);
>> +       }
>> +
>> +       cnt = of_property_count_u32_elems(np, "clock-indices");
>> +       if (cnt < 0) {
>> +               pr_err("rt2880-clock: clock-indices property is invalid.\n");
>> +               return cnt;
>> +       }
>> +
>> +       num = 0;
>> +       for (i = 0; i < cnt; i++) {
>> +               if (of_property_read_u32_index(np, "clock-indices", i, &val))
> 
> I'm a little lost one what the indices are for? Why is the number space
> being folded like this?

I want to let the clock cell index match  with the bit number in the 
gate control register.
Is my "clock-indices" usage wrong ?

  reply	other threads:[~2019-05-01 10:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  0:01 [RFC v2 0/5] MIPS: ralink: peripheral clock gating driver NOGUCHI Hiroshi
2019-04-05  0:01 ` [RFC v2 1/5] clk: mips: ralink: add Ralink MIPS gating clock driver NOGUCHI Hiroshi
2019-04-25 19:27   ` Stephen Boyd
2019-05-01 10:58     ` NOGUCHI Hiroshi [this message]
2019-04-05  0:01 ` [RFC v2 2/5] dt-bindings: clk: add document for ralink " NOGUCHI Hiroshi
2019-04-25 19:29   ` Stephen Boyd
2019-05-01 11:33     ` NOGUCHI Hiroshi
2019-05-02 21:42       ` Stephen Boyd
2019-04-05  0:01 ` [RFC v2 3/5] mips: ralink: mt7620/76x8 use common clk framework NOGUCHI Hiroshi
2019-04-25 19:18   ` Stephen Boyd
2019-04-05  0:01 ` [RFC v2 4/5] mips: ralink: mt76x8: add nodes for clocks NOGUCHI Hiroshi
2019-04-05  0:01 ` [RFC v2 5/5] mips: ralink: mt7620: " NOGUCHI Hiroshi

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=63290737-8f9a-3d17-77ed-d5417a58294a@gmail.com \
    --to=drvlabo@gmail.com \
    --cc=john@phrozen.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.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).