Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, alsa-devel@alsa-project.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: [PATCH] rcar: src: skip disabled-SRC nodes
Date: Thu, 12 May 2016 01:36:40 +0300	[thread overview]
Message-ID: <2350728.BUGJNqvVzR@wasted.cogentembedded.com> (raw)

The current device tree representation of the R-Car Sample Rate Converters
(SRC) assumes that they are numbered consecutively, starting from 0. Alas,
this  is not  the case with the R8A7794 SoC where SRC0 isn't present.  In
order to keep the existing  device trees working, I'm suggesting to use a
disabled node for SRC0.  Teach the SRC probe  to just skip disabled nodes.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the 'for-next' branch of Mark Brown's 'sound.git' repo.

sound/soc/sh/rcar/src.c |    4 ++++
 sound/soc/sh/rcar/src.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: sound/sound/soc/sh/rcar/src.c
===================================================================
--- sound.orig/sound/soc/sh/rcar/src.c
+++ sound/sound/soc/sh/rcar/src.c
@@ -572,6 +572,9 @@ int rsnd_src_probe(struct rsnd_priv *pri
 
 	i = 0;
 	for_each_child_of_node(node, np) {
+		if (!of_device_is_available(np))
+			goto skip;
+
 		src = rsnd_src_get(priv, i);
 
 		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
@@ -595,6 +598,7 @@ int rsnd_src_probe(struct rsnd_priv *pri
 		if (ret)
 			goto rsnd_src_probe_done;
 
+skip:
 		i++;
 	}
 

             reply	other threads:[~2016-05-11 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 22:36 Sergei Shtylyov [this message]
2016-05-12  0:41 ` [PATCH] rcar: src: skip disabled-SRC nodes Kuninori Morimoto
2016-05-12 19:30   ` Sergei Shtylyov
2016-05-13  7:59 ` Applied "rcar: src: skip disabled-SRC nodes" to the asoc tree 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=2350728.BUGJNqvVzR@wasted.cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=perex@perex.cz \
    --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