mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ASoC: rockchip: sai: Add support lanes parsed from DT
used to assign lanes from DT. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Change-Id: I2064b201a8325e0b5d1e7a448a14345443a173a4
This commit is contained in:
@@ -765,8 +765,19 @@ static int rockchip_sai_path_prepare(struct rk_sai_dev *sai,
|
||||
static int rockchip_sai_parse_paths(struct rk_sai_dev *sai,
|
||||
struct device_node *np)
|
||||
{
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
if (!device_property_read_u32(sai->dev, "rockchip,tdm-tx-lanes", &val)) {
|
||||
if ((val >= 1) && (val <= 4))
|
||||
sai->tx_lanes = val;
|
||||
}
|
||||
|
||||
if (!device_property_read_u32(sai->dev, "rockchip,tdm-rx-lanes", &val)) {
|
||||
if ((val >= 1) && (val <= 4))
|
||||
sai->rx_lanes = val;
|
||||
}
|
||||
|
||||
ret = rockchip_sai_path_prepare(sai, np, 0);
|
||||
if (ret < 0) {
|
||||
dev_err(sai->dev, "Failed to prepare TX path: %d\n", ret);
|
||||
|
||||
Reference in New Issue
Block a user