linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	Akshu Agrawal <Akshu.Agrawal@amd.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Support Opensource <support.opensource@diasemi.com>
Subject: Re: [PATCH] ASoC: da7219: Use clk_round_rate to handle enabled bclk/wclk case
Date: Sun, 28 Apr 2019 02:19:55 +0900	[thread overview]
Message-ID: <20190427171955.GH14916@sirena.org.uk> (raw)
In-Reply-To: <20190426125925.04F3F3FB4A@swsrvapps-01.diasemi.com>

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On Fri, Apr 26, 2019 at 01:59:24PM +0100, Adam Thomson wrote:

> +		/*
> +		 * Rounding the rate here avoids failure trying to set a new
> +		 * rate on an already enabled wclk. In that instance this will
> +		 * just set the same rate as is currently in use, and so should
> +		 * continue without problem.
> +		 */
> +		sr = clk_round_rate(wclk, sr);
>  		ret = clk_set_rate(wclk, sr);
>  		if (ret) {
>  			dev_err(component->dev,

Don't we need to validate that the rounded rate is actually viable for
the parameters we're trying to set here?  If there's missing constraints
causing something to try to do something unsupportable then we should
return an error rather than silently accept.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-04-27 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 12:59 [PATCH] ASoC: da7219: Use clk_round_rate to handle enabled bclk/wclk case Adam Thomson
2019-04-27 17:19 ` Mark Brown [this message]
2019-04-29  9:16   ` Adam Thomson
2019-05-02  1:30     ` 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=20190427171955.GH14916@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=Akshu.Agrawal@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=support.opensource@diasemi.com \
    --cc=tiwai@suse.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).