ASoC: rockchip: i2s-tdm: Compatible for deprecated property 'clk-trcm'

In kernel 6.1 and later versions, the property 'clk-trcm' has been updated:

  rockchip,clk-trcm -> rockchip,trcm-sync-tx/rx-only

Not all products' DT have been updated to use the new property. Therefore,
still support for old property for now, and a prompt is logged to suggest
to adopt the new property.

The old property will be removed in a future version.

Log:

  Deprecated property 'rockchip,clk-trcm', please use 'rockchip,trcm-sync-tx/rx-only' in DT

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I594ba932486440d6eefc65abb54516d530ad090b
This commit is contained in:
Sugar Zhang
2025-08-29 16:58:43 +08:00
committed by Tao Huang
parent 4f0e1facb7
commit 6094a7765e

View File

@@ -3294,6 +3294,11 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
i2s_tdm->frame_width = 64;
i2s_tdm->clk_trcm = TRCM_TXRX;
if (!of_property_read_u32(node, "rockchip,clk-trcm", &val)) {
if (val >= 0 && val <= 2)
i2s_tdm->clk_trcm = val;
dev_warn(i2s_tdm->dev, "Deprecated property 'rockchip,clk-trcm', please use 'rockchip,trcm-sync-tx/rx-only' in DT\n");
}
if (of_property_read_bool(node, "rockchip,trcm-sync-tx-only"))
i2s_tdm->clk_trcm = TRCM_TX;
if (of_property_read_bool(node, "rockchip,trcm-sync-rx-only")) {