ASoC: spacemit: rename clock inputs to match binding

The driver requests the per-controller SSPA bus and functional clocks
as "sspa_bus" and "sspa", but the device tree binding (spacemit,k1-i2s)
specifies them as "bus" and "func". As a result, any DT written against
the published binding fails to probe.

There are currently no in-tree DT users referencing these names, so
rename the clock inputs in the driver to match the binding rather than
changing the binding. While at it, rename the matching struct member
sspa_clk to func_clk for consistency with the new clock-names.

Fixes: fce2174490 ("ASoC: spacemit: add i2s support for K1 SoC")
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/20260721-kx-i2s-dts-v1-1-d22cb6cfaab5@linux.spacemit.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Troy Mitchell 2026-07-21 19:35:55 -07:00 committed by Mark Brown
parent 3a06525741
commit 4c69d04958
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -52,7 +52,7 @@ struct spacemit_i2s_dev {
struct clk *sysclk;
struct clk *bclk;
struct clk *sspa_clk;
struct clk *func_clk;
struct clk *sysclk_div;
struct clk *c_sysclk;
struct clk *c_bclk;
@ -221,7 +221,7 @@ static int spacemit_i2s_hw_params(struct snd_pcm_substream *substream,
if (ret)
return ret;
return clk_set_rate(i2s->sspa_clk, bclk_rate);
return clk_set_rate(i2s->func_clk, bclk_rate);
}
static int spacemit_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, int clk_id,
@ -452,14 +452,14 @@ static int spacemit_i2s_probe(struct platform_device *pdev)
if (IS_ERR(i2s->bclk))
return dev_err_probe(i2s->dev, PTR_ERR(i2s->bclk), "failed to enable bit clock\n");
clk = devm_clk_get_enabled(i2s->dev, "sspa_bus");
clk = devm_clk_get_enabled(i2s->dev, "bus");
if (IS_ERR(clk))
return dev_err_probe(i2s->dev, PTR_ERR(clk), "failed to enable sspa_bus clock\n");
return dev_err_probe(i2s->dev, PTR_ERR(clk), "failed to enable bus clock\n");
i2s->sspa_clk = devm_clk_get_enabled(i2s->dev, "sspa");
if (IS_ERR(i2s->sspa_clk))
return dev_err_probe(i2s->dev, PTR_ERR(i2s->sspa_clk),
"failed to enable sspa clock\n");
i2s->func_clk = devm_clk_get_enabled(i2s->dev, "func");
if (IS_ERR(i2s->func_clk))
return dev_err_probe(i2s->dev, PTR_ERR(i2s->func_clk),
"failed to enable func clock\n");
i2s->sysclk_div = devm_clk_get_optional_enabled(i2s->dev, "sysclk_div");
if (IS_ERR(i2s->sysclk_div))