]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: sparx5: add compatible string for lan969x
authorDaniel Machon <daniel.machon@microchip.com>
Wed, 23 Oct 2024 22:01:33 +0000 (00:01 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Oct 2024 01:08:06 +0000 (18:08 -0700)
Add lan9691-switch compatible string to mchp_sparx5_match. Guard it with
IS_ENABLED(CONFIG_LAN969X_SWITCH) to make sure Sparx5 can be compiled on
its own.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20241024-sparx5-lan969x-switch-driver-2-v2-14-a0b5fae88a0f@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/sparx5/sparx5_main.c

index 741404ccd8f5ebc38dc60ebfc01217311667c428..fde9e06b3458ef2d12560739a76733297f32f7ac 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/types.h>
 #include <linux/reset.h>
 
+#include "../lan969x/lan969x.h" /* for lan969x match data */
+
 #include "sparx5_main_regs.h"
 #include "sparx5_main.h"
 #include "sparx5_port.h"
@@ -1050,6 +1052,9 @@ static const struct sparx5_match_data sparx5_desc = {
 
 static const struct of_device_id mchp_sparx5_match[] = {
        { .compatible = "microchip,sparx5-switch", .data = &sparx5_desc },
+#if IS_ENABLED(CONFIG_LAN969X_SWITCH)
+       { .compatible = "microchip,lan9691-switch", .data = &lan969x_desc },
+#endif
        { }
 };
 MODULE_DEVICE_TABLE(of, mchp_sparx5_match);