]> git.itanic.dy.fi Git - linux-stable/commit
net: dsa: microchip: perform the compatibility check for dev probed
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 17 May 2022 09:43:27 +0000 (15:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 May 2022 11:50:59 +0000 (12:50 +0100)
commiteee16b147121cec77db51455ef30f4ad5102b270
tree89c42a19f2615504b5bbc1a436c5444b7c9dc310
parent462d525018f068338a4d0b571aa515e26a8320e7
net: dsa: microchip: perform the compatibility check for dev probed

This patch perform the compatibility check for the device after the chip
detect is done. It is to prevent the mismatch between the device
compatible specified in the device tree and actual device found during
the detect. The ksz9477 device doesn't use any .data in the
of_device_id. But the ksz8795_spi uses .data for assigning the regmap
between 8830 family and 87xx family switch. Changed the regmap
assignment based on the chip_id from the .data.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8795_spi.c
drivers/net/dsa/microchip/ksz8863_smi.c
drivers/net/dsa/microchip/ksz9477_i2c.c
drivers/net/dsa/microchip/ksz9477_spi.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h