Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: microchip: move ksz_chip_id enum to platform include

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>

authored by

Daniel Danzberger and committed by
David S. Miller
d16f1096 3bc05faf

+20 -19
+1 -19
drivers/net/dsa/microchip/ksz_common.h
··· 14 14 #include <linux/regmap.h> 15 15 #include <net/dsa.h> 16 16 #include <linux/irq.h> 17 + #include <linux/platform_data/microchip-ksz.h> 17 18 18 19 #include "ksz_ptp.h" 19 20 ··· 202 201 LAN9372, 203 202 LAN9373, 204 203 LAN9374, 205 - }; 206 - 207 - enum ksz_chip_id { 208 - KSZ8563_CHIP_ID = 0x8563, 209 - KSZ8795_CHIP_ID = 0x8795, 210 - KSZ8794_CHIP_ID = 0x8794, 211 - KSZ8765_CHIP_ID = 0x8765, 212 - KSZ8830_CHIP_ID = 0x8830, 213 - KSZ9477_CHIP_ID = 0x00947700, 214 - KSZ9896_CHIP_ID = 0x00989600, 215 - KSZ9897_CHIP_ID = 0x00989700, 216 - KSZ9893_CHIP_ID = 0x00989300, 217 - KSZ9563_CHIP_ID = 0x00956300, 218 - KSZ9567_CHIP_ID = 0x00956700, 219 - LAN9370_CHIP_ID = 0x00937000, 220 - LAN9371_CHIP_ID = 0x00937100, 221 - LAN9372_CHIP_ID = 0x00937200, 222 - LAN9373_CHIP_ID = 0x00937300, 223 - LAN9374_CHIP_ID = 0x00937400, 224 204 }; 225 205 226 206 enum ksz_regs {
+19
include/linux/platform_data/microchip-ksz.h
··· 22 22 #include <linux/types.h> 23 23 #include <linux/platform_data/dsa.h> 24 24 25 + enum ksz_chip_id { 26 + KSZ8563_CHIP_ID = 0x8563, 27 + KSZ8795_CHIP_ID = 0x8795, 28 + KSZ8794_CHIP_ID = 0x8794, 29 + KSZ8765_CHIP_ID = 0x8765, 30 + KSZ8830_CHIP_ID = 0x8830, 31 + KSZ9477_CHIP_ID = 0x00947700, 32 + KSZ9896_CHIP_ID = 0x00989600, 33 + KSZ9897_CHIP_ID = 0x00989700, 34 + KSZ9893_CHIP_ID = 0x00989300, 35 + KSZ9563_CHIP_ID = 0x00956300, 36 + KSZ9567_CHIP_ID = 0x00956700, 37 + LAN9370_CHIP_ID = 0x00937000, 38 + LAN9371_CHIP_ID = 0x00937100, 39 + LAN9372_CHIP_ID = 0x00937200, 40 + LAN9373_CHIP_ID = 0x00937300, 41 + LAN9374_CHIP_ID = 0x00937400, 42 + }; 43 + 25 44 struct ksz_platform_data { 26 45 /* Must be first such that dsa_register_switch() can access it */ 27 46 struct dsa_chip_data cd;