From: John Hsu <KCHSU0@nuvoton.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, anatol.pomozov@gmail.com,
YHCHuang@nuvoton.com, lgirdwood@gmail.com, benzh@chromium.org,
CTLIN0@nuvoton.com, mhkuo@nuvoton.com, yong.zhi@intel.com
Subject: Re: [PATCH] ASoC: nau8825: extend FLL function
Date: Thu, 10 Mar 2016 12:31:54 +0800 [thread overview]
Message-ID: <56E0F8BA.4010209@nuvoton.com> (raw)
In-Reply-To: <20160309024034.GC3898@sirena.org.uk>
On 3/9/2016 10:40 AM, Mark Brown wrote:
> On Tue, Mar 08, 2016 at 07:58:53PM +0800, John Hsu wrote:
>
>
>> In the patch, we add FLL clock source selection. The source can be from
>> MCLK, BCLK or FS.
>> Besides, driver extend higher frequency for better performance in FLL
>> calculation,
>> and has different register apply if fraction or not. Just separate it.
>> Right?
>>
>
> I think that's what I was asking for, yes.
>
I'll split these solution into two patches later and resubmit.
>
>>> That comment sounds *very* suspicous, if we are using MCLK we should
>>> manage it via the clock API. If the platform doesn't have good clock
>>> support we should fix the platform.
>>>
>
>
>> In initiation, we get mclk object from platform as the following code.
>> If the mclk is not found, we don't need to prepare it in the driver.
>>
>
>
>> nau8825->mclk = devm_clk_get(dev, "mclk");
>> ...
>> } else if (PTR_ERR(nau8825->mclk) == -ENOENT) {
>> /* The MCLK is managed externally or not used at all */
>> nau8825->mclk = NULL;
>> dev_info(dev, "No 'mclk' clock found, assume MCLK is managed
>> externally");
>>
>
> This really isn't a good way to be handling things, you should be
> ensuring that platforms that have an MCLK provide one via the clock API.
> If the clock is missing that should indicate that it's the second case
> where it's not used at all.
>
Do you mean I should use devm_clk_get to check mclk exist instead of
nau8825->mclk in nau8825_mclk_prepare function? And return a warn-
ing message if mclk is missing?
next prev parent reply other threads:[~2016-03-10 4:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-28 18:23 [PATCH] ASoC: nau8825: extend FLL function John Hsu
2016-03-01 3:23 ` Mark Brown
2016-03-08 11:58 ` John Hsu
2016-03-09 2:40 ` Mark Brown
2016-03-10 4:31 ` John Hsu [this message]
2016-03-10 5:24 ` Mark Brown
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=56E0F8BA.4010209@nuvoton.com \
--to=kchsu0@nuvoton.com \
--cc=CTLIN0@nuvoton.com \
--cc=YHCHuang@nuvoton.com \
--cc=alsa-devel@alsa-project.org \
--cc=anatol.pomozov@gmail.com \
--cc=benzh@chromium.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=mhkuo@nuvoton.com \
--cc=yong.zhi@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.