linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Turquette <mturquette@baylibre.com>
To: York Sun <yorksun@freescale.com>,  sboyd@codeaurora.org
Cc: linux-clk@vger.kernel.org, "York Sun" <yorksun@freescale.com>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Andrey Filippov" <andrey@elphel.com>,
	"Paul Bolle" <pebolle@tiscali.nl>
Subject: Re: [Patch v6] driver/clk/clk-si5338: Add common clock framework driver for si5338
Date: Thu, 22 Oct 2015 09:46:42 -0700	[thread overview]
Message-ID: <20151022164642.20687.57688@quantum> (raw)
In-Reply-To: <1444240750-30842-1-git-send-email-yorksun@freescale.com>

Hello York Sun,

Quoting York Sun (2015-10-07 10:59:10)
> +static const struct clk_ops si5338_xtal_ops =3D {
> +       .prepare =3D si5338_xtal_prepare,

There are many instances of .prepare where there is no matching
.unprepare. Why is that? And what are these .prepare callbacks doing?
Are they changing rates or just enabling the clock signals?

> +static const struct clk_ops si5338_clkout_ops =3D {
> +       .prepare =3D si5338_clkout_prepare,
> +       .unprepare =3D si5338_clkout_unprepare,
> +       .enable =3D si5338_clkout_enable,
> +       .disable =3D si5338_clkout_disable,

This is an i2c device, so I'm confused how an .enable or .disable
callback is appropriate.

> +       /*
> +        * To form clock names, concatentate name prefix with each name.
> +        * The result string is up to MAX_NAME_LENGTH including terminati=
on.
> +        */
> +
> +       /* Register xtal input clock */
> +       if (!IS_ERR_OR_NULL(drvdata->pxtal)) {
> +               strlcpy(register_name, drvdata->name_prefix, MAX_NAME_PRE=
FIX);
> +               strncat(register_name, si5338_input_names[4], STRNCAT_LEN=
GTH);
> +               drvdata->pxtal_name =3D __clk_get_name(drvdata->pxtal);

I don't really understand what's going on here. Why is this necessary?
Are you not able to get this info from DT?

Regards,
Mike

  reply	other threads:[~2015-10-22 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 17:59 [Patch v6] driver/clk/clk-si5338: Add common clock framework driver for si5338 York Sun
2015-10-22 16:46 ` Michael Turquette [this message]
2015-10-22 17:00   ` York Sun

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=20151022164642.20687.57688@quantum \
    --to=mturquette@baylibre.com \
    --cc=andrey@elphel.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pebolle@tiscali.nl \
    --cc=sboyd@codeaurora.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=yorksun@freescale.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;
as well as URLs for NNTP newsgroup(s).