* [PATCH] ASoC: xilinx: replace OF with device handlers
@ 2026-08-03 23:18 Rosen Penev
2026-08-04 7:53 ` Vincenzo Frascino
2026-08-04 19:50 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2026-08-03 23:18 UTC (permalink / raw)
To: linux-sound
Cc: Vincenzo Frascino, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Michal Simek, moderated list:ARM/ZYNQ ARCHITECTURE,
open list
All of these usages of OF handlers use the node from the
platform_device. Use the device member to simplify slightly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
sound/soc/xilinx/xlnx_formatter_pcm.c | 2 --
sound/soc/xilinx/xlnx_i2s.c | 12 +++++-------
sound/soc/xilinx/xlnx_spdif.c | 8 +++-----
3 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c
index 8f7a76758535..55b5b473d85f 100644
--- a/sound/soc/xilinx/xlnx_formatter_pcm.c
+++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
@@ -9,8 +9,6 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
#include <linux/sizes.h>
#include <sound/asoundef.h>
diff --git a/sound/soc/xilinx/xlnx_i2s.c b/sound/soc/xilinx/xlnx_i2s.c
index 0676da122edd..273258125497 100644
--- a/sound/soc/xilinx/xlnx_i2s.c
+++ b/sound/soc/xilinx/xlnx_i2s.c
@@ -9,9 +9,8 @@
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -174,7 +173,6 @@ static int xlnx_i2s_probe(struct platform_device *pdev)
int ret;
u32 format;
struct device *dev = &pdev->dev;
- struct device_node *node = dev->of_node;
drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
if (!drv_data)
@@ -184,13 +182,13 @@ static int xlnx_i2s_probe(struct platform_device *pdev)
if (IS_ERR(drv_data->base))
return PTR_ERR(drv_data->base);
- ret = of_property_read_u32(node, "xlnx,num-channels", &drv_data->channels);
+ ret = device_property_read_u32(dev, "xlnx,num-channels", &drv_data->channels);
if (ret < 0)
return dev_err_probe(dev, ret, "cannot get supported channels\n");
drv_data->channels *= 2;
- ret = of_property_read_u32(node, "xlnx,dwidth", &drv_data->data_width);
+ ret = device_property_read_u32(dev, "xlnx,dwidth", &drv_data->data_width);
if (ret < 0)
return dev_err_probe(dev, ret, "cannot get data width\n");
@@ -205,7 +203,7 @@ static int xlnx_i2s_probe(struct platform_device *pdev)
return -EINVAL;
}
- if (of_device_is_compatible(node, "xlnx,i2s-transmitter-1.0")) {
+ if (device_is_compatible(dev, "xlnx,i2s-transmitter-1.0")) {
drv_data->dai_drv.name = "xlnx_i2s_playback";
drv_data->dai_drv.playback.stream_name = "Playback";
drv_data->dai_drv.playback.formats = format;
@@ -213,7 +211,7 @@ static int xlnx_i2s_probe(struct platform_device *pdev)
drv_data->dai_drv.playback.channels_max = drv_data->channels;
drv_data->dai_drv.playback.rates = SNDRV_PCM_RATE_8000_192000;
drv_data->dai_drv.ops = &xlnx_i2s_dai_ops;
- } else if (of_device_is_compatible(node, "xlnx,i2s-receiver-1.0")) {
+ } else if (device_is_compatible(dev, "xlnx,i2s-receiver-1.0")) {
drv_data->dai_drv.name = "xlnx_i2s_capture";
drv_data->dai_drv.capture.stream_name = "Capture";
drv_data->dai_drv.capture.formats = format;
diff --git a/sound/soc/xilinx/xlnx_spdif.c b/sound/soc/xilinx/xlnx_spdif.c
index ae05818ba064..a70ca6beb646 100644
--- a/sound/soc/xilinx/xlnx_spdif.c
+++ b/sound/soc/xilinx/xlnx_spdif.c
@@ -10,8 +10,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_platform.h>
+#include <linux/property.h>
#include <linux/platform_device.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -242,7 +241,6 @@ static int xlnx_spdif_probe(struct platform_device *pdev)
struct spdif_dev_data *ctx;
struct device *dev = &pdev->dev;
- struct device_node *node = dev->of_node;
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
@@ -257,7 +255,7 @@ static int xlnx_spdif_probe(struct platform_device *pdev)
if (IS_ERR(ctx->base))
return PTR_ERR(ctx->base);
- ret = of_property_read_u32(node, "xlnx,spdif-mode", &ctx->mode);
+ ret = device_property_read_u32(dev, "xlnx,spdif-mode", &ctx->mode);
if (ret < 0)
return dev_err_probe(dev, ret, "cannot get SPDIF mode\n");
@@ -278,7 +276,7 @@ static int xlnx_spdif_probe(struct platform_device *pdev)
dai_drv = &xlnx_spdif_rx_dai;
}
- ret = of_property_read_u32(node, "xlnx,aud_clk_i", &ctx->aclk);
+ ret = device_property_read_u32(dev, "xlnx,aud_clk_i", &ctx->aclk);
if (ret < 0)
return dev_err_probe(dev, ret, "cannot get aud_clk_i value\n");
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: xilinx: replace OF with device handlers
2026-08-03 23:18 [PATCH] ASoC: xilinx: replace OF with device handlers Rosen Penev
@ 2026-08-04 7:53 ` Vincenzo Frascino
2026-08-04 19:50 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Vincenzo Frascino @ 2026-08-04 7:53 UTC (permalink / raw)
To: Rosen Penev, linux-sound
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Michal Simek, moderated list:ARM/ZYNQ ARCHITECTURE, open list
On 04/08/2026 00:18, Rosen Penev wrote:
> All of these usages of OF handlers use the node from the
> platform_device. Use the device member to simplify slightly.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Thank you!
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: xilinx: replace OF with device handlers
2026-08-03 23:18 [PATCH] ASoC: xilinx: replace OF with device handlers Rosen Penev
2026-08-04 7:53 ` Vincenzo Frascino
@ 2026-08-04 19:50 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-08-04 19:50 UTC (permalink / raw)
To: linux-sound, Rosen Penev
Cc: Vincenzo Frascino, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Michal Simek, linux-arm-kernel, linux-kernel
On Mon, 03 Aug 2026 16:18:23 -0700, Rosen Penev wrote:
> ASoC: xilinx: replace OF with device handlers
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/1] ASoC: xilinx: replace OF with device handlers
https://git.kernel.org/broonie/sound/c/99ddfbba9e71
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-05 10:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 23:18 [PATCH] ASoC: xilinx: replace OF with device handlers Rosen Penev
2026-08-04 7:53 ` Vincenzo Frascino
2026-08-04 19:50 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox