devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Turquette <mturquette@baylibre.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Magnus Damm <damm+renesas@opensource.se>,
	Simon Horman <horms+renesas@verge.net.au>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v4 5/5] [RFC] clk: shmobile: r8a7795: Add new CPG/MSSR driver
Date: Tue, 20 Oct 2015 06:00:04 -0700	[thread overview]
Message-ID: <20151020130004.20687.91058@quantum> (raw)
In-Reply-To: <CAMuHMdUT=fZKCOCdkn+=grZ0wYATghQhmbX-Y6WJ9+ViZ0cidA@mail.gmail.com>

Quoting Geert Uytterhoeven (2015-10-20 05:31:12)
> Hi Mike,
> 
> On Tue, Oct 20, 2015 at 2:24 PM, Michael Turquette
> <mturquette@baylibre.com> wrote:
> > Quoting Geert Uytterhoeven (2015-10-16 05:49:20)
> >> +static void __init r8a7795_cpg_mssr_init(struct device_node *np)
> >> +{
> >> +       struct regmap *regmap;
> >> +       u32 reg, cpg_mode;
> >> +
> >> +       regmap = syscon_regmap_lookup_by_phandle(np, "renesas,modemr");
> >> +       if (IS_ERR(regmap) ||
> >> +           of_property_read_u32_index(np, "renesas,modemr", 1, &reg) ||
> >> +           regmap_read(regmap, reg, &cpg_mode)) {
> >> +               pr_err("%s: failed to parse renesas,modemr\n", np->full_name);
> >> +               return;
> >> +       }
> >> +
> >> +       cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
> >> +       if (!cpg_pll_config->extal_div) {
> >> +               pr_err("%s: Prohibited setting (cpg_mode=0x%x)\n",
> >> +                      __func__, cpg_mode);
> >> +               return;
> >> +       }
> >> +
> >> +       cpg_mssr_probe(np, &r8a7795_cpg_mssr_info);
> >> +}
> >> +CLK_OF_DECLARE(r8a7795_cpg_mssr, "renesas,r8a7795-cpg-mssr",
> >> +              r8a7795_cpg_mssr_init);
> >
> > Is CLK_OF_DECLARE needed? Is it possible to make this a real
> > platform_driver à la drivers/clk/qcom/gcc-apq8084.c?
> 
> I tried making it a real platform driver, but it failed: devices that are
> part of the Clock Domain failed to get their clock (error -2, IIRC, which is
> -ENOENT), and thus couldn't be instantiated.
> I didn't look deeper at that time.
> 
> [... reading code ...]
> 
> Aha, this may be caused by __of_clk_get_from_provider() returning
> hardcoded -ENOENT instead of propagating the error returned by
> __clk_create_clk()?

Well the only other error thrown by __clk_create_clk is -ENOMEM, so I'm
not sure how that would help things.

The bindings should go in for 4.4, but if the driver is slated for 4.5
then can you investigate this some more? Stephen and I are on a mission
to have _real_ clk drivers.

Regards,
Mike

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

  reply	other threads:[~2015-10-20 13:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 12:49 [PATCH/RFC v4 0/5] clk: shmobile: Add new Renesas CPG/MSSR DT bindings Geert Uytterhoeven
2015-10-16 12:49 ` [PATCH v4 1/5] [RFC] " Geert Uytterhoeven
2015-10-20 10:15   ` Michael Turquette
     [not found]   ` <1444999760-15750-2-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2015-10-20 12:16     ` Geert Uytterhoeven
     [not found]       ` <CAMuHMdVhBipbf13o0jb3H6qmcewh6CCtq3=Hj-9nvgar+AYdFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-20 16:01         ` Magnus Damm
     [not found]           ` <CANqRtoS6QpWJY99aD8KyGHgySxqzzBPic-k_a-VcZE6LVFFRow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-23 11:05             ` Laurent Pinchart
2015-10-23 11:09               ` Geert Uytterhoeven
2015-10-23 11:11                 ` Laurent Pinchart
2015-10-23 11:10   ` Laurent Pinchart
2015-10-26 19:02     ` Geert Uytterhoeven
2015-10-27  1:34       ` Laurent Pinchart
2015-10-27  8:14         ` Geert Uytterhoeven
2015-10-30 13:30           ` Laurent Pinchart
2015-10-16 12:49 ` [PATCH v4 2/5] [RFC] clk: shmobile: Add r8a7795 CPG Core Clock Definitions Geert Uytterhoeven
2015-10-20 10:09   ` Geert Uytterhoeven
2015-10-20 16:21     ` Magnus Damm
2015-10-23 11:21   ` Laurent Pinchart
2015-10-23 11:25     ` Geert Uytterhoeven
2015-10-16 12:49 ` [PATCH v4 3/5] [RFC] clk: shmobile: div6: Extract cpg_div6_register() Geert Uytterhoeven
2015-10-23 11:28   ` Laurent Pinchart
2015-10-16 12:49 ` [PATCH v4 4/5] [RFC] clk: shmobile: cpg-mssr: Add new CPG/MSSR driver core Geert Uytterhoeven
2015-10-16 12:49 ` [PATCH v4 5/5] [RFC] clk: shmobile: r8a7795: Add new CPG/MSSR driver Geert Uytterhoeven
2015-10-20 12:24   ` Michael Turquette
2015-10-20 12:31     ` Geert Uytterhoeven
2015-10-20 13:00       ` Michael Turquette [this message]
2015-10-20 13:07         ` Geert Uytterhoeven
2015-10-22 12:58           ` Geert Uytterhoeven
2015-10-24  1:10             ` Stephen Boyd
2015-10-24 17:34               ` Geert Uytterhoeven
2015-10-26  2:25                 ` Laurent Pinchart
2015-10-26  8:03                   ` Geert Uytterhoeven
2015-10-30 13:12                     ` Laurent Pinchart
2015-10-29 14:03             ` Geert Uytterhoeven

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=20151020130004.20687.91058@quantum \
    --to=mturquette@baylibre.com \
    --cc=damm+renesas@opensource.se \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms+renesas@verge.net.au \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@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).