Skip to content

Commit 98a0111

Browse files
Danielmachonkuba-moo
authored andcommitted
net: sparx5: add compatible string for lan969x
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 <[email protected]> Signed-off-by: Daniel Machon <[email protected]> Link: https://patch.msgid.link/20241024-sparx5-lan969x-switch-driver-2-v2-14-a0b5fae88a0f@microchip.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 41c6439 commit 98a0111

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/microchip/sparx5/sparx5_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <linux/types.h>
2525
#include <linux/reset.h>
2626

27+
#include "../lan969x/lan969x.h" /* for lan969x match data */
28+
2729
#include "sparx5_main_regs.h"
2830
#include "sparx5_main.h"
2931
#include "sparx5_port.h"
@@ -1050,6 +1052,9 @@ static const struct sparx5_match_data sparx5_desc = {
10501052

10511053
static const struct of_device_id mchp_sparx5_match[] = {
10521054
{ .compatible = "microchip,sparx5-switch", .data = &sparx5_desc },
1055+
#if IS_ENABLED(CONFIG_LAN969X_SWITCH)
1056+
{ .compatible = "microchip,lan9691-switch", .data = &lan969x_desc },
1057+
#endif
10531058
{ }
10541059
};
10551060
MODULE_DEVICE_TABLE(of, mchp_sparx5_match);

0 commit comments

Comments
 (0)