]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 27 Apr 2021 07:09:03 +0000 (09:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Apr 2021 21:13:23 +0000 (14:13 -0700)
commit6cec7448c4ece59100b07af5184e88557ac79be7
tree0faa44c606f75dd715917ce9dfb061d2fcc35b97
parentbc2c06cda24fc5c370a083fd91b2806b95d80cd7
net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct

In order to get this driver used with other switches the functions need
to use different offsets and register shifts. This patch changes the
direct use of the register defines to register description structures,
which can be set depending on the chips register layout.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8.h [new file with mode: 0644]
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz8795_reg.h