lkml.org 
[lkml]   [2019]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: da7219: Use clk_round_rate to handle enabled bclk/wclk case
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-04-27 19:20    [W:0.609 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site