External email: Use caution opening links or attachmentsSorry if I was not clear before.
Hi Sameer
Oops, sorry I was misunderstand.Are you suggesting if we should simplify simple_parse_mclk_fs() bysnprintf(prop, sizeof(prop), "%smclk-fs", prefix);Maybe we want to have "cpu" in simple_dai_link_of_dpcm() side
of_property_read_u32(node, prop, &props->mclk_fs);
of_property_read_u32(cpu, prop, &props->mclk_fs);
- of_property_read_u32(codec, prop, &props->mclk_fs);
+
+ if (cpu != codec)
+ of_property_read_u32(codec, prop, &props->mclk_fs);
without using magical code in simple_parse_mclk_fs() side ?
either passing 'cpu' or 'codec'?
But I still not 100% understand what do you want to do here.
Maybe 50% is my English skill, but in your code
(C) of_property_read_u32(cpu, prop, &props->mclk_fs);
- of_property_read_u32(codec, prop, &props->mclk_fs);
+
+ if (cpu != codec)
(B) + of_property_read_u32(codec, prop, &props->mclk_fs);
and
- simple_parse_mclk_fs(top, np, codec, dai_props, prefix);
(A) + simple_parse_mclk_fs(top, np, np, dai_props, prefix);
Because of (A), cpu = codec = np in simple_parse_mclk_fs().
Do we have chance to call (B) ?
And it still have read_u32(cpu, ...) at (C),
this means all np will read mclk_fs anyway ?
For me, if you don't want/need mclk_fs, don't set it on DT
is the best answer, but am I misunderstanding ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto