[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260127-rockchip-spdif-cleanup-and-bsp-sync-v1-2-a7c547072bbb@collabora.com>
Date: Tue, 27 Jan 2026 17:08:22 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Heiko Stuebner <heiko@...ech.de>
Cc: Alexey Charkov <alchark@...il.com>,
Sjoerd Simons <sjoerd.simons@...labora.com>, linux-sound@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: [PATCH 02/10] ASoC: rockchip: spdif: Move DT compatible table
Move rk_spdif_match DT compatible table to the usual place before the
platform-driver struct definition and drop the useless of_match_ptr(),
since it is fine to reference the DT id table even when OF support is
disabled (which makes the driver useless anyways).
Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
---
sound/soc/rockchip/rockchip_spdif.c | 48 ++++++++++++++++++-------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index 23f14274a6e0..331a23d5173f 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -40,29 +40,6 @@ struct rk_spdif_dev {
struct regmap *regmap;
};
-static const struct of_device_id rk_spdif_match[] __maybe_unused = {
- { .compatible = "rockchip,rk3066-spdif",
- .data = (void *)RK_SPDIF_RK3066 },
- { .compatible = "rockchip,rk3188-spdif",
- .data = (void *)RK_SPDIF_RK3188 },
- { .compatible = "rockchip,rk3228-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3288-spdif",
- .data = (void *)RK_SPDIF_RK3288 },
- { .compatible = "rockchip,rk3328-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3366-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3368-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3399-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- { .compatible = "rockchip,rk3568-spdif",
- .data = (void *)RK_SPDIF_RK3366 },
- {},
-};
-MODULE_DEVICE_TABLE(of, rk_spdif_match);
-
static int rk_spdif_runtime_suspend(struct device *dev)
{
struct rk_spdif_dev *spdif = dev_get_drvdata(dev);
@@ -377,12 +354,35 @@ static const struct dev_pm_ops rk_spdif_pm_ops = {
RUNTIME_PM_OPS(rk_spdif_runtime_suspend, rk_spdif_runtime_resume, NULL)
};
+static const struct of_device_id rk_spdif_match[] = {
+ { .compatible = "rockchip,rk3066-spdif",
+ .data = (void *)RK_SPDIF_RK3066 },
+ { .compatible = "rockchip,rk3188-spdif",
+ .data = (void *)RK_SPDIF_RK3188 },
+ { .compatible = "rockchip,rk3228-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3288-spdif",
+ .data = (void *)RK_SPDIF_RK3288 },
+ { .compatible = "rockchip,rk3328-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3366-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3368-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3399-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ { .compatible = "rockchip,rk3568-spdif",
+ .data = (void *)RK_SPDIF_RK3366 },
+ {},
+};
+MODULE_DEVICE_TABLE(of, rk_spdif_match);
+
static struct platform_driver rk_spdif_driver = {
.probe = rk_spdif_probe,
.remove = rk_spdif_remove,
.driver = {
.name = "rockchip-spdif",
- .of_match_table = of_match_ptr(rk_spdif_match),
+ .of_match_table = rk_spdif_match,
.pm = pm_ptr(&rk_spdif_pm_ops),
},
};
--
2.51.0
Powered by blists - more mailing lists