linux-stable/sound/soc/sh
Kuninori Morimoto c413983eb6
ASoC: rsnd: adjust disabled module
In general Renesas SoC's SSI/SRC are all enabled, but some SoC is not.

	H2	E2

	SRC0	      <=
	SRC1	SRC1
	SRC2	SRC2
	...	...

Renesas Sound driver is assuming that *all* modules are
enabled, and thus it is using *data array* to access each modules.
Because of it, we have been using "status = disabled" at DT,
and using *full size* array but avoiding disabled module.

ex)
	rcar_sound,src {
		src-0 {
=>			status = "disabled";
		};
		src1: src-1 {
			...
		};
		...

But R-Car D3 have many disabled modules (It has SSI3/SSI4, SRC5/SRC6),
and Renesas SoC maintainer don't want above style on DT.

ex)
	rcar_sound,src {
=>		src0: src-0 { status = "disabled"; };
=>		src1: src-1 { status = "disabled"; };
=>		src2: src-2 { status = "disabled"; };
=>		src3: src-3 { status = "disabled"; };
=>		src4: src-4 { status = "disabled"; };
		src5: src-5 {
			...
		};
		src6: src-6 {
			...
		};
	};

	rcar_sound,ssi {
=>		ssi0: ssi-0 { status = "disabled"; };
=>		ssi1: ssi-1 { status = "disabled"; };
=>		ssi2: ssi-2 { status = "disabled"; };
		ssi3: ssi-3 {
			...
		};
		ssi4: ssi-4 {
			...
		};
	};

To adjust it, it needs to care about related for_each_child_of_node()
loop on rsnd driver, and it is used from...

	> grep -l for_each_child_of_node sound/soc/sh/rcar/*
	sound/soc/sh/rcar/core.c
	sound/soc/sh/rcar/ctu.c
	sound/soc/sh/rcar/dma.c
	sound/soc/sh/rcar/dvc.c
	sound/soc/sh/rcar/mix.c
	sound/soc/sh/rcar/src.c
	sound/soc/sh/rcar/ssi.c
	sound/soc/sh/rcar/ssiu.c

This patch adjust to this situation.
By this patch, we can avoid disabled modules on DT

	rcar_sound,src {
		src5: src-5 {
			...
		};
		src6: src-6 {
			...
		};
	};

	rcar_sound,ssi {
		ssi3: ssi-3 {
			...
		};
		ssi4: ssi-4 {
			...
		};
	};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875yyzk017.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:04:15 +01:00
..
rcar ASoC: rsnd: adjust disabled module 2021-06-01 14:04:15 +01:00
dma-sh7760.c ASoC: sh: dma-sh7760: remove unused variable 2021-03-10 13:06:59 +00:00
fsi.c ASoC: sh: use asoc_substream_to_rtd() 2020-07-23 19:07:25 +01:00
hac.c ASoC: soc-core: remove bus_control 2020-01-21 17:07:08 +00:00
Kconfig ASoC: sh: depend on COMMON_CLK to fix compile tests 2020-11-23 20:39:47 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
migor.c ASoC: sh: use asoc_substream_to_rtd() 2020-07-23 19:07:25 +01:00
sh7760-ac97.c ASoC: sh: sh7760-ac97: use modern dai_link style 2019-06-06 21:37:35 +01:00
siu.h ASoC: siu: Fix build error by a wrong const prefix 2021-01-27 12:35:18 +00:00
siu_dai.c ASoC: siu: convert to SPDX identifiers 2018-06-18 12:16:42 +01:00
siu_pcm.c ASoC: sh: siu_pcm: remove unused variable 2021-03-10 13:07:04 +00:00
ssi.c ASoC: ssi: don't use discriminatory terms for debug log 2020-07-14 16:38:24 +01:00