* [PATCH] rcar: src: skip disabled-SRC nodes
@ 2016-05-11 22:36 Sergei Shtylyov
2016-05-12 0:41 ` Kuninori Morimoto
2016-05-13 7:59 ` Applied "rcar: src: skip disabled-SRC nodes" to the asoc tree Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-05-11 22:36 UTC (permalink / raw)
To: lgirdwood, broonie, perex, tiwai, alsa-devel; +Cc: linux-renesas-soc
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++;
}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] rcar: src: skip disabled-SRC nodes
2016-05-11 22:36 [PATCH] rcar: src: skip disabled-SRC nodes Sergei Shtylyov
@ 2016-05-12 0:41 ` 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
1 sibling, 1 reply; 4+ messages in thread
From: Kuninori Morimoto @ 2016-05-12 0:41 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-renesas-soc
Hi
> 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>
>
> ---
Maybe best solution is caring DT's @ number (src@0, src@1, ...) somehow
but, it makes rsnd_src_probe() and other src related function complex code.
This can keep simple code.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rcar: src: skip disabled-SRC nodes
2016-05-12 0:41 ` Kuninori Morimoto
@ 2016-05-12 19:30 ` Sergei Shtylyov
0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-05-12 19:30 UTC (permalink / raw)
To: Kuninori Morimoto
Cc: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-renesas-soc
Hello.
I'm now seeing I have unintended dash between words in the subject. Should
I resend?
On 05/12/2016 03:41 AM, Kuninori Morimoto wrote:
>> 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>
>>
>> ---
>
> Maybe best solution is caring DT's @ number (src@0, src@1, ...) somehow
Thought about it too... as well as adding an optional "reg" property.
> but, it makes rsnd_src_probe() and other src related function complex code.
> This can keep simple code.
>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thank you.
MBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Applied "rcar: src: skip disabled-SRC nodes" to the asoc tree
2016-05-11 22:36 [PATCH] rcar: src: skip disabled-SRC nodes Sergei Shtylyov
2016-05-12 0:41 ` Kuninori Morimoto
@ 2016-05-13 7:59 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-05-13 7:59 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Kuninori Morimoto, Mark Brown, lgirdwood
The patch
rcar: src: skip disabled-SRC nodes
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From de1965159a34951a86267d13db4f2a67234139d3 Mon Sep 17 00:00:00 2001
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Thu, 12 May 2016 01:36:40 +0300
Subject: [PATCH] rcar: src: skip disabled-SRC nodes
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>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/sh/rcar/src.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 15d6ffe8be74..e39f916d0f2f 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -572,6 +572,9 @@ int rsnd_src_probe(struct rsnd_priv *priv)
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 *priv)
if (ret)
goto rsnd_src_probe_done;
+skip:
i++;
}
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-13 7:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 22:36 [PATCH] rcar: src: skip disabled-SRC nodes Sergei Shtylyov
2016-05-12 0:41 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox