On Tue, Jun 30, 2020 at 09:53:13AM +0530, Sameer Pujar wrote:
On 6/30/2020 7:38 AM, Kuninori Morimoto wrote:I agree with Moromito-san that the new code (especially the above bit)
External email: Use caution opening links or attachmentsSorry if I was not clear before.
+ if (cpu != codec)
+ of_property_read_u32(codec, prop, &props->mclk_fs);
is very confusing, I'm not sure how the reader is supposed to figure out
what the purpose of the check is or how the CPU could ever be the CODEC.
simple_parse_mclk_fs() is used by both simple_dai_link_of_dpcm() andThat'd definitely be simpler, or supporting this with a CPU node as
simple_dai_link_of(). To make the same API work for both the cases, I had to
use (A) in DPCM function. Now (B) does not get used for
simple_dai_link_of_dpcm(), but will get used by simple_dai_link_of().
If it is simpler I will just avoid 'cpu != codec' check and keep the
function simple_parse_mclk_fs() as it is.
well.