From: Jyri Sarha <jsarha@ti.com>
To: Nicolin Chen <Guangyu.Chen@freescale.com>, broonie@kernel.org
Cc: moinejf@free.fr, alsa-devel@alsa-project.org,
kuninori.morimoto.gx@renesas.com, tiwai@suse.de,
lgirdwood@gmail.com
Subject: Re: [PATCH 1/3] ASoC: simple-card: Drop node->name checking
Date: Thu, 24 Apr 2014 15:47:59 +0300 [thread overview]
Message-ID: <535907FF.3040303@ti.com> (raw)
In-Reply-To: <ef6f96d375c8771c93469168790e0098610bd250.1398337861.git.Guangyu.Chen@freescale.com>
On 04/24/2014 02:13 PM, Nicolin Chen wrote:
> The current simple-card driver limits the DT node name to "sound".
> Any of other names is forbidden while actually we should allow DT
> to pass other node names.
>
> And if this function is being called, the node must already have
> the compatible "simple-audio-card" in DTB. So there should be no
> need to check the name here.
>
> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
> ---
> sound/soc/generic/simple-card.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
> index 3f2e580..383a4a1 100644
> --- a/sound/soc/generic/simple-card.c
> +++ b/sound/soc/generic/simple-card.c
> @@ -156,8 +156,7 @@ static int simple_card_dai_link_of(struct device_node *node,
> char *prefix = "";
> int ret;
>
> - if (!strcmp("sound", node->name))
> - prefix = "simple-audio-card,";
> + prefix = "simple-audio-card,";
>
> daifmt = snd_soc_of_parse_daifmt(node, prefix,
> &bitclkmaster, &framemaster);
>
I think you have missed the point of selecting the prefix based on the
node name.
Before the change the "simple-audio-card,"-prefix was only needed for
dai-link properties and subnodes if the dai-link node was omitted in a
single dai-link setup.
After your change the prefix is also needed for the properties and
subnodes inside dai-link subnodes.
See the details in: Documentation/devicetree/bindings/sound/simple-card.txt
Maybe the implementation could have been more explicit, but I think the
old behavior is more convenient. If we anyway decide to go with this
change then at least the DT binding document should be updated.
Best regards,
Jyri
next prev parent reply other threads:[~2014-04-24 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 11:13 [PATCH 0/3] Fix some minor issues in simple card driver Nicolin Chen
2014-04-24 11:13 ` [PATCH 1/3] ASoC: simple-card: Drop node->name checking Nicolin Chen
2014-04-24 12:47 ` Jyri Sarha [this message]
2014-04-24 13:03 ` Mark Brown
2014-04-24 13:05 ` Jyri Sarha
2014-04-24 11:13 ` [PATCH 2/3] ASoC: simple-card: Simplify error msg in simple_card_dai_link_of() Nicolin Chen
2014-04-24 11:14 ` [PATCH 3/3] ASoC: simple-card: Improve coding style Nicolin Chen
2014-04-24 12:20 ` [PATCH 0/3] Fix some minor issues in simple card driver 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=535907FF.3040303@ti.com \
--to=jsarha@ti.com \
--cc=Guangyu.Chen@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=moinejf@free.fr \
--cc=tiwai@suse.de \
/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