net: dsa: microchip: move ksz_chip_id enum to platform include
authorDaniel Danzberger <dd@embedd.com>
Tue, 5 Dec 2023 16:42:31 +0000 (17:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Dec 2023 12:00:20 +0000 (12:00 +0000)
With the ksz_chip_id enums moved to the platform include file for ksz
switches, platform code that instantiates a device can now use these to
set ksz_platform_data::chip_id.

Signed-off-by: Daniel Danzberger <dd@embedd.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.h
include/linux/platform_data/microchip-ksz.h

index d1a1c876ba0dafd052736294b150a6f95409d444..15612101a155b0f7fe753f3a3fbbe06fdc221ccf 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/regmap.h>
 #include <net/dsa.h>
 #include <linux/irq.h>
+#include <linux/platform_data/microchip-ksz.h>
 
 #include "ksz_ptp.h"
 
@@ -203,25 +204,6 @@ enum ksz_model {
        LAN9374,
 };
 
-enum ksz_chip_id {
-       KSZ8563_CHIP_ID = 0x8563,
-       KSZ8795_CHIP_ID = 0x8795,
-       KSZ8794_CHIP_ID = 0x8794,
-       KSZ8765_CHIP_ID = 0x8765,
-       KSZ8830_CHIP_ID = 0x8830,
-       KSZ9477_CHIP_ID = 0x00947700,
-       KSZ9896_CHIP_ID = 0x00989600,
-       KSZ9897_CHIP_ID = 0x00989700,
-       KSZ9893_CHIP_ID = 0x00989300,
-       KSZ9563_CHIP_ID = 0x00956300,
-       KSZ9567_CHIP_ID = 0x00956700,
-       LAN9370_CHIP_ID = 0x00937000,
-       LAN9371_CHIP_ID = 0x00937100,
-       LAN9372_CHIP_ID = 0x00937200,
-       LAN9373_CHIP_ID = 0x00937300,
-       LAN9374_CHIP_ID = 0x00937400,
-};
-
 enum ksz_regs {
        REG_SW_MAC_ADDR,
        REG_IND_CTRL_0,
index 6480bf4af0fb8cc8f19ac906efa049e5dc59f77d..f177416635a222a2982fbdd944e8a95e6cd48278 100644 (file)
 #include <linux/types.h>
 #include <linux/platform_data/dsa.h>
 
+enum ksz_chip_id {
+       KSZ8563_CHIP_ID = 0x8563,
+       KSZ8795_CHIP_ID = 0x8795,
+       KSZ8794_CHIP_ID = 0x8794,
+       KSZ8765_CHIP_ID = 0x8765,
+       KSZ8830_CHIP_ID = 0x8830,
+       KSZ9477_CHIP_ID = 0x00947700,
+       KSZ9896_CHIP_ID = 0x00989600,
+       KSZ9897_CHIP_ID = 0x00989700,
+       KSZ9893_CHIP_ID = 0x00989300,
+       KSZ9563_CHIP_ID = 0x00956300,
+       KSZ9567_CHIP_ID = 0x00956700,
+       LAN9370_CHIP_ID = 0x00937000,
+       LAN9371_CHIP_ID = 0x00937100,
+       LAN9372_CHIP_ID = 0x00937200,
+       LAN9373_CHIP_ID = 0x00937300,
+       LAN9374_CHIP_ID = 0x00937400,
+};
+
 struct ksz_platform_data {
        /* Must be first such that dsa_register_switch() can access it */
        struct dsa_chip_data cd;