Re: [PATCH 02/20] net: xilinx: tsn: add TSN endpoint wrapper driver

"Neeli, Srinivas" <[email protected]>
Newsgroups org.kernel.vger.netdev,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Uwe,

On 8/8/2026 2:28 AM, Uwe Kleine-König wrote:
> Hello,
>
> On Fri, Aug 07, 2026 at 04:14:13PM +0530, Nagadheeraj Rottela wrote:
>> diff --git a/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_main.c b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_main.c
>> new file mode 100644
>> index 000000000000..1ef1b0c2ee6e
>> --- /dev/null
>> +++ b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_main.c
>> @@ -0,0 +1,105 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +/*
>> + * Time Sensitive Networking (TSN) Ethernet MAC wrapper driver.
>> + *
>> + * Copyright (C) 2026 Advanced Micro Devices, Inc.
>> + */
>> +
>> +#include <linux/clk.h>
>> +#include <linux/device.h>
>> +#include <linux/mod_devicetable.h>
>> +#include <linux/module.h>
>> +#include <linux/of.h>
>> +#include <linux/of_platform.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/slab.h>
>> +#include <linux/types.h>
> Please drop <linux/mod_devicetable.h>. This header is planned to go away
> soon and you can rely on <linux/platform_device.h> to provide
> of_device_id.

Thanks for review, Will update in V2 series.

>> [...]
>> +static struct platform_driver * const tsn_drivers[] = {
>> +	&tsn_driver,
>> +};
>> +
>> +static int __init xlnx_tsn_init(void)
>> +{
>> +	return platform_register_drivers(tsn_drivers, ARRAY_SIZE(tsn_drivers));
>> +}
>> +module_init(xlnx_tsn_init);
>> +
>> +static void __exit xlnx_tsn_exit(void)
>> +{
>> +	platform_unregister_drivers(tsn_drivers, ARRAY_SIZE(tsn_drivers));
>> +}
>> +module_exit(xlnx_tsn_exit);
> I assume you expect tsn_drivers[] to grow? If not, use
> module_platform_driver() to reduce boilerplate.

Yes, patch 3 adds &xlnx_tsn_ep_driver to the array, so I will keep 
platform_register_drivers().

Thanks

Srinivas Neeli
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.