From 6094a7765eaccfb21c6781f8d2997d2a3b36798e Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Fri, 29 Aug 2025 16:58:43 +0800 Subject: [PATCH] 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 Change-Id: I594ba932486440d6eefc65abb54516d530ad090b --- sound/soc/rockchip/rockchip_i2s_tdm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c index ce832212b0be..8b42006a71b0 100644 --- a/sound/soc/rockchip/rockchip_i2s_tdm.c +++ b/sound/soc/rockchip/rockchip_i2s_tdm.c @@ -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")) {