Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: rsnd: don't assume node full path name for HDMI probing

Current ssi.c is assuming below 2 things to probing HDMI node.
1) remote node is including "hdmi0" or "hdmi1" in node name
2) remote_ep->full_name is including full path name

But, these assumptions are broken by below
1) Node names should not use numerical suffixes
commit 6b5ac2f1cb11 ("arm64: dts: renesas: r8a7795: Drop bogus HDMI
node names suffixes")
2) node full_name no longer include full path name
commit a7e4cfb0a7ca ("of/fdt: only store the device node basename
in full_name")

Because of these reasons, ssi.c can't probe HDMI on current kernel.
This patch probes HDMI0/1 by using its address.
Note is that we need to keep updating for this address for future
generation chip.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
9ff73866 d188e140

+9 -2
+9 -2
sound/soc/sh/rcar/ssi.c
··· 1004 1004 struct device *dev = rsnd_priv_to_dev(priv); 1005 1005 struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); 1006 1006 struct rsnd_ssi *ssi; 1007 + struct device_node *remote_node = of_graph_get_port_parent(remote_ep); 1008 + 1009 + /* support Gen3 only */ 1010 + if (!rsnd_is_gen3(priv)) 1011 + return; 1007 1012 1008 1013 if (!mod) 1009 1014 return; 1010 1015 1011 1016 ssi = rsnd_mod_to_ssi(mod); 1012 1017 1013 - if (strstr(remote_ep->full_name, "hdmi0")) { 1018 + /* HDMI0 */ 1019 + if (strstr(remote_node->full_name, "hdmi@fead0000")) { 1014 1020 rsnd_flags_set(ssi, RSND_SSI_HDMI0); 1015 1021 dev_dbg(dev, "%s[%d] connected to HDMI0\n", 1016 1022 rsnd_mod_name(mod), rsnd_mod_id(mod)); 1017 1023 } 1018 1024 1019 - if (strstr(remote_ep->full_name, "hdmi1")) { 1025 + /* HDMI1 */ 1026 + if (strstr(remote_node->full_name, "hdmi@feae0000")) { 1020 1027 rsnd_flags_set(ssi, RSND_SSI_HDMI1); 1021 1028 dev_dbg(dev, "%s[%d] connected to HDMI1\n", 1022 1029 rsnd_mod_name(mod), rsnd_mod_id(mod));