Skip to content

Commit

Permalink
ASoC: codecs: wsa881x: add static port map support
Browse files Browse the repository at this point in the history
Two instances of WSA881x(Speaker Right, Speaker Left) ports
are statically mapped to master ports. Allow the driver to parse
those mappings from device tree.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  • Loading branch information
Srinivas-Kandagatla authored and intel-lab-lkp committed Mar 9, 2021
1 parent 5402ab3 commit d0e48ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/soc/codecs/wsa881x.c
Expand Up @@ -1105,6 +1105,11 @@ static int wsa881x_probe(struct sdw_slave *pdev,
return PTR_ERR(wsa881x->sd_n);
}

if (of_property_read_u32_array(dev->of_node, "qcom,port-mapping",
pdev->m_port_map,
WSA881X_MAX_SWR_PORTS))
dev_info(dev, "Static Port mapping not specified\n");

dev_set_drvdata(&pdev->dev, wsa881x);
wsa881x->slave = pdev;
wsa881x->dev = &pdev->dev;
Expand Down

0 comments on commit d0e48ba

Please sign in to comment.